Forum Discussion
Stacked bar y-axis based on another chart
Apparently I can't attach a file.
Nor can I insert pictures or code without this [mindboggling un-user friendly] forum software stripping out what it declares to be inappropriate html...
Here is a link to the file: https://drive.google.com/file/d/1r6eNKsoxmrnzqjjIUiQG-XLHAcRO0IBk/view?usp=sharing
The data is in a table like the one shown in the attached picture.
I'm using measures like this to provide counts each of "High, "Medium" & "Low"
No. of High Original Risks =
CALCULATE(
COUNTA(q_Compliance[Original Risk]),
q_Compliance[Original Risk] = "High"
, USERELATIONSHIP('Calendar'[Date],q_Compliance[Risk Assessment Date])
)
Then using these in stacked bar visuals like in the other attached picture:
...I’m trying to create a measure to select as the Maximum Range for the Y-Axis for both charts
The measure should be logically something like
110% times
(the maximum, in any given period,
(the maximum of the sum of the counts of the High, Medium & Low from the [Original Risk] column)
and
(the maximum of the sum of the counts of the High, Medium & Low from the [Current Risk] column)
in that period)
Hello k1s2 ,
from what i understand, you want to set the max of the y-axis to be the same base on the max between the 2 meaures. ( first measure is based on the original risk , the second on the current risk ) for the 2 charts
you can create the following measure :
max_y_axis =
var _original_risk_max =
maxx(
allselected( table_name[original risk]),
calculate( aggregation, userrelationship ( .... , ..... ) )
)
var _current_risk_max =
maxx(
allselected( table_name[original risk]),
calculate( aggregation , userrelationship ( .... , ..... ) )
)
RETURN
max ( _current_risk_max , _original_risk_max )
hope this helps.