
Re: Dynamic Scaling  YAxis in Qlik Sense Chart
Giles Walker Feb 1, 2017 2:30 PM (in response to Giles Walker)Hi  can anyone please help me? Thanks.

Re: Dynamic Scaling  YAxis in Qlik Sense Chart
Michael Solomovich Feb 1, 2017 3:10 PM (in response to Giles Walker)See this: Custom range for Yaxis as maximum value of the measure + fix number
Except you need min rather than max. Aggregate by your chart dimension, which,as I understand could be Date or Week or Month.

Re: Dynamic Scaling  YAxis in Qlik Sense Chart
Giles Walker Feb 2, 2017 2:39 PM (in response to Michael Solomovich )Hi Michael,
Awesome, this is exactly what I need, thanks so much. In line with the explanation in the link, I copied the formula, and mine looked like this:
 min(aggr(Sum(tot_shipped)/Sum(tot_ordered),Order_Month))  0.001
This resulted in my chart looking like this:
So as required, the min value for Order_Month of 95.62% is 0.1% above the min on the Y axis i.e. min for Y axis is 95.52%.
From this I have come across my next hurdle, and I hope you can advise me please?
The X axis has 2 alternative dimensions which are:
 Order_Week
 Order_Day
When I use the above formula (only specifying Order_Month), and then I select an alternative dimension on the X Axis (I chose Order_week), the min position for the Y Axis is of course kept relative to the Min for the Order_Month, thus creating a chart looking like this:
Obviously the 2 items circled in red here are weekly %'s that fall below that Order_Month min of 95.52%. This means that the visualization isn't quite finished for me yet.
What I need is the chart to display the min Y Axis value relative to the min of that specific dimension, i.e. in the example above:
 When choosing Order_Month, the min value would calculate to be 95.52%
 When choosing Order_Week, the min value would would calculate to be 94.80%
 When choosing Order_Day, the min value would would calculate to be 87.86%
Do you have any suggestions as to the best way to achieve that dynamic result? I'm not sure how to make it happen.
Thanks
Giles

Re: Dynamic Scaling  YAxis in Qlik Sense Chart
Michael Solomovich Feb 3, 2017 3:08 PM (in response to Giles Walker)You have to aggregate by chart dimension. If chart dimension can change, your expression will be conditional.
From your description, I can't give you the exact expression, but just the logic:
if(<dimension is Order_Month>,
min(aggr(Sum(tot_shipped)/Sum(tot_ordered),Order_Month)),
if(<dimension is Order_Week>,
min(aggr(Sum(tot_shipped)/Sum(tot_ordered),Order_Week)),
if(<dimension is Order_Day>,
min(aggr(Sum(tot_shipped)/Sum(tot_ordered),Order_Day))))  0.001
The only thing you need to figure out is how exactly the dimension condition will look likw.
Please count my open and close (), I could miscount them..

Re: Dynamic Scaling  YAxis in Qlik Sense Chart
Giles Walker Feb 7, 2017 1:27 PM (in response to Michael Solomovich )This is the nearest answer to what I needed (thanks Michael), but after research and another thread (How to choose a Dimension via IF statement) unfortunately in Qlik Sense there is no way to know the active dimension to make such dynamic requirements possible for what I need. This is a shame as I am sure a lot of people would actually find this useful when charting.
Thanks to all for their assistance. I can't spend anymore time on this now so I have just set a basic min statement as below based on the main dimension discussed by the business, Order_Month.
 min(aggr(Sum(tot_shipped)/Sum(tot_ordered),Order_Month))  0.001
Other dimensions that go below the min determined in this statement will simply be displayed by the value and the arrow indicating that the bar in the chart goes below the min. Not ideal, but it will have to suffice.
Cheer again all.




Re: Dynamic Scaling  YAxis in Qlik Sense Chart
Alban Piveteau May 31, 2017 5:29 AM (in response to Giles Walker)Hello,
I understand that we can't get the active dimension on a chart but what about the selected Measure when we have a defined lternatives measures ?
I have a graph with static dimension but several alternatives, I have tried this :
=if(GetObjectMeasure(0)='Measure Label',Min1,Min2) where "Measure Label si the label of current measure used.
It's not working, any guess ?

Re: Dynamic Scaling  YAxis in Qlik Sense Chart
Giles Walker May 31, 2017 3:59 PM (in response to Alban Piveteau)Alban  I tried that too, so see if I could make it work, but no. I am not experienced with this function unfortunately.
