Forum Discussion
nleuck_101
10 months agoContinued Contributor
Max y-axis based on field parameter selected
Hello All, I could use some help getting the max y-axis from the selected field parameter slicer. I don't like that the y-axis is showing 800 when the total is over 800. I would pefer it be 1,000...
parry2k
9 months agoSuper User
nleuck_101 here you go, change table and column name as per your model:
Measure =
--parameter table name and parameter column name you are using on slicer
VAR __SelectedParameter = MAXX ( ALLSELECTED ( Parameter ), [Parameter] )
//this would be table and column that you are using on x-axis,
//for example if it is a year column from date table then this would be
//ALLSELECTED ( 'Date'[Year] )
VAR __Table = ALLSELECTED ( 'Calendar'[Month Sort], 'Calendar'[Month] )
RETURN
//so depedning on the paramter name selected, you just switch to that measure
//in my case I have paramter with two name Qty and Sales and these correspond to
//[Qty] and [Sales] measure, make changes to switch statement as per your model
SWITCH (
__SelectedParameter,
"Qty", MAXX ( __Table, [Qty] ),
"Sales", MAXX ( __Table, [Sales] )
)nleuck_101
9 months agoContinued Contributor
parry2k
This did not change anything. My Y-axis values look just like my screenshot.