Forum Discussion
Anonymous
6 years agoNot applicable
two different visuals with the same chart-axis range
Has anyone been successful with having the same chart-axis range with two different visuals? For example, I have two line charts where the y-axis range changes dynamically for two data sets. I wo...
WillBr
1 year agoNew Member
I have a solution but requires a little work.
Using a measure you will need to find the Max value from each of the charts then the max value from the 2. Now set the max range to this measure.
Max Rounded Value =
VAR MaxA =
MAXX(
SUMMARIZE(
'Table A',
'Date table'[Date].[Month],
"Total A", SUM('Table A'[Value A])
),
[Total A]
)
VAR MaxB =
MAXX(
SUMMARIZE(
'Table B',
'Date table'[Date].[Month],
"Total B", SUM('Table B'[Value B])
),
[Total B]
)
VAR MaxValue = MAX(MaxA , MaxB )
VAR RoundedResult =
SWITCH(
TRUE(),
MaxValue <= 100, CEILING(MaxValue, 10),
MaxValue<= 1000, CEILING(MaxValue, 100),
MaxValue<= 10000, CEILING(MaxValue, 1000),
CEILING(MaxValue, 10000)
)
RETURN RoundedResult
K_cherry
1 year agoNew Member
To expand on this, just wanted to bring attention to the F(x) button for a range maximum, which is where you can associate your chart max with a measure. By the way, in my measure, I multipled my result by 1.16 so that the max line actually showed up (it truncates it for some reason).