Direct answer to your question is No .And from my experience this is also not a good practice. But As this is your requirement so may be some twist it with parameter and calculated field and give you some positive solution . I tried but it seems difficult to implement . Sorry
We can use the auto or fixed in axis but we cannot set this with parameter.
We can not apply parameter to change axis to fixed or automatic
Here are the steps -
1) Create a parameter ("Start Axis at") with value 1 and 0. Here 1 is start with axis as 0 & 0 as null.
2) Create following calculated field -
if [Start Axis at]=1 then WINDOW_MAX( SUM( [Sales] ) )*.05 end
3) Put that field into detail section & create a reference line with the above field & choose maximum of it.
So, Now you can check this by changing the parameter value.
Check the attached file, which is in version 9.
Hope this may help!
Nice work Prashant . I tried but i am not able to complete . I think this will the best work around for this use case .
Thank you for your assistance, however this is not quite what I'm looking for.
Using your attached workbook, say if you add another filter using the Location field for example, and then filter the data by different locations, you will see that the y axis automatically re-calculates its range to accommodate the amount of data it needs to display.
Filtering by the location Alexandria, you can see that the maximum y-axis value is $5,000:
Then if I filter by location Arlington, you can see that the maximum y-axis value becomes $12,000 to accommodate the data:
What Id like to do is if the user sets the parameter value to "Fixed", the y axis scale will not re-calculate when changing filters, or if the user sets the parameter value to "Non-Fixed", the y axis scale will automatically re-calculate as necessary.
For that you need a different approach. But in following steps, there are different restrictions. One is that you have to do single select in filter & other that you can't select "All". If you want these things also then again we have to enhance the procedure. But for this scenario you can use following steps -
1) Create a calculated field using following formula -
If [Start Axis at]=1 then window_sum(sum(Sales)) else sum([Sales]) end
2) Create a calculation & put this into filter.
3) Put City into filter section.
4) Compute both the fields correctly according to requirement.
Check the attached file. Hope this may help!
Thanks again for your help Prashant, although when I tested your example workbook the y-axis range still changed for certain Cities.
When you are selecting some location then some of the category is not having any values & that is why it is changing the axis by filtering out those categories.
Here, all strategies are depends upon what you have & what is your exact requirement. Can you please attach your workbook (.twbx) (If it is confidential then just create some dummy data). Also, let me know the exact requirement.
Here, I am showing total for all the cities which is different for every category. So, wanted to know that what is the upper limit you want in your chart.