Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Y axis scaling problem

Hi,

I'm trying to set a static max expression axis for a drill-down bar chart. To do this, I'm trying to set based on the maximum value for the initial dimension value as follows:

MAX(Aggr(Sum(if(DSetType='Target J',1)),User))

So I trying to sum all matching records in my set and aggregrate on the user. I thought this would give me the top value by user but the scale is topping off over 800 instead of around 160. When I drill-down to the user details, again the axis per month is much higher than the maximum value shown on the chart.

What am I doing wrong? The dimension is based on a drill-down group (of user and month). Is this confusing the chart?

Thanks
Nick

1 Solution

Accepted Solutions
pover
Partner - Master
Partner - Master

You might have to inclue Month in the aggr() function like

MAX(Aggr(Sum(if(DSetType='Target J',1)),User,Month))

,but this probably will not work either because it might give you a axis that is too small per User, so try the following, too.

MAX(Aggr(Sum(if(DSetType='Target J',1)),getcurrentfield(DrillDownGroupName)))

or just,

MAX(Aggr(Sum(if(DSetType='Target J',1)),DrillDownGroupName))

Regards.

View solution in original post

1 Reply
pover
Partner - Master
Partner - Master

You might have to inclue Month in the aggr() function like

MAX(Aggr(Sum(if(DSetType='Target J',1)),User,Month))

,but this probably will not work either because it might give you a axis that is too small per User, so try the following, too.

MAX(Aggr(Sum(if(DSetType='Target J',1)),getcurrentfield(DrillDownGroupName)))

or just,

MAX(Aggr(Sum(if(DSetType='Target J',1)),DrillDownGroupName))

Regards.