Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help in formula for Max of an axis

Hello,

I have a stacked bar chart (snippet below) which has values ranging from 2 to 0. I have to limit the graph to show top 50 values and then if needed drill down into others.

Right now, when I do that, the axis is changing to the max value of "Others" which I do not want. Is there some formula (I hope there is) so that we can set the max of the Y axis to the aggregate (in my example 2).

Thanks in advance.

Capture.PNG

1 Solution

Accepted Solutions
sunny_talwar

May be like this:

Max(Aggr(YourExpression, ChartDimension))

or

Max({1}Aggr(YourExpression, ChartDimension))

Ignore selection in yourExpression also adding 1 to it -> {1<.....>}

View solution in original post

5 Replies
sunny_talwar

May be like this:

Max(Aggr(YourExpression, ChartDimension))

or

Max({1}Aggr(YourExpression, ChartDimension))

Ignore selection in yourExpression also adding 1 to it -> {1<.....>}

Not applicable
Author

That perfectly did it. Would you know how to round it up?

P.S: Already happy with this

Not applicable
Author

Figured it out. Used the round. Thanks a bunch

sunny_talwar

Awesome

harishicon
Partner - Creator
Partner - Creator

Can u explain me how to use above mentioned formula use in my chart.

My expression is :

((SUM({<JRNAL_TYPE={'ZHI01'},Flag={"$(vFlag)"}, [Account Type]={'P'} ,[Debit Credit]={'C'}, [Transaction Date]={">=$(vMonthStartMaxDate)<=$(vMaxTransDate)"}, FiscalMonthName= , FiscalYear= >}[Transaction Amount])

+

(-1*SUM({<JRNAL_TYPE={'ZHI01'},Flag={"$(vFlag)"}, [Account Type]={'P'} ,[Debit Credit]={'D'}, [Transaction Date]={">=$(vMonthStartMaxDate)<=$(vMaxTransDate)"}, FiscalMonthName= , FiscalYear= >}[Transaction Amount]))

)

/

100000

)