5 Replies Latest reply: Jul 9, 2016 3:03 AM by Harish Kumar

# 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).

• ###### 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<.....>}

• ###### Re: Help in formula for Max of an axis

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

• ###### Re: Help in formula for Max of an axis

Figured it out. Used the round. Thanks a bunch

• ###### Re: Help in formula for Max of an axis

Awesome

• ###### 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

)