Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

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

Tags (1)
1 Solution

Accepted Solutions
MVP
MVP

Re: Help in formula for Max of an axis

May be like this:

Max(Aggr(YourExpression, ChartDimension))

or

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

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

5 Replies
MVP
MVP

Re: Help in formula for Max of an axis

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

Re: Help in formula for Max of an axis

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

P.S: Already happy with this

Not applicable

Re: Help in formula for Max of an axis

Figured it out. Used the round. Thanks a bunch

MVP
MVP

Re: Help in formula for Max of an axis

Awesome

harishicon
New Contributor III

Re: Help in formula for Max of an axis

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

)

Community Browser