Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
r_wroblewski
Partner - Creator III
Partner - Creator III

same Static Max (y-axis scale) for 2 bar charts based on max value inside both graphs

Dear Community,

I try to achieve that two bar charts using same scale(y-axis) based on the max value inside both charts.

Both graphs have same two expressions like:

e.g.:

Sum({$<Period=,YearMonth={">=$(=$(vChartMinMonth))<=$(=$(vChartMaxMonth))"},PrimaryDataFLG={'1'},[Balance_of_payment]={'[Income]'}>}Value)

First expression is default and

Second expression can be activated by an additional menu.

e.g. First bar show Income and Second bar show Expenditure(optional)

Only difference is that second graph is in alternate state B to set different period.


What I try to achieve with Static Max is that both graphs have same scale based on the max value of the available bars inside the two graphs.


Until now I couldn't find a way to achieve it.

If someone has a good advise please share.


Regards,

Ronny


PS: I will try to upload a sample file later when I have a little bit more time.





1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I would think it would be: (using a simplified expression:

rangemax(max(aggr(sum({$}Sales), Dim), max(aggr(sum({AlltState}Sales), Dim))

-Rob

View solution in original post

4 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I would think it would be: (using a simplified expression:

rangemax(max(aggr(sum({$}Sales), Dim), max(aggr(sum({AlltState}Sales), Dim))

-Rob

r_wroblewski
Partner - Creator III
Partner - Creator III
Author

Dear Rob,

thanks for your fast reply.

Unfortunately the scale didn't change for both charts also when Static Max is set for all expressions according your proposal. I will try to modify my expressions, settings and see if I can make it work with RangeMax(Max.... .

Does the static max just need to be set for the first expression (default) in the object like Axes settings?

Regards,

Ronny

r_wroblewski
Partner - Creator III
Partner - Creator III
Author

Dear Rob,

Thanks to your advice, I could make it work.

I changed my second graph from alternate state to inherit and use now set analysis with 2 new variables for min & max month. Now Static Max is working and both graphs using same scale.

As long the graphs were in different state I couldn't get it work also with same logic.

Best regards,

Ronny

PS: Maybe you also can give me a hint how I could solve another problem:

Stacked bar chart and "Text on Axis" expression

berndjaegle
Creator II
Creator II

Thanks Rob.