Forum Discussion
Measure Not Working on Line Chart Y-Axis Maximum
- 1 year ago
Hi Cabbage_Baby ,
I recommend using a field parameter for selection of Week/Month/Year rather than bookmarks.
You can then retrieve the selected field parameter within the
Max Y-Axismeasures.The problem with the bookmark method is that, at the "visual level" where the
Max Y-Axismeasure is evaluated,ISINSCOPE ( ... )will always return false because there is no "hierarchy of levels" in that context. The hierarchy levels only exist for measures that are grouped by the axis fields, which is why the measure works in the matrix visual.As an example, I created a field parameter called
Date Parameterand edited the calculated table expression slightly:Date Parameter = { ( "Week", NAMEOF ( Calendar_Lookup[Start of Week] ), 0 ), ( "Month", NAMEOF ( Calendar_Lookup[Start of Month] ), 1 ), ( "Year", NAMEOF ( Calendar_Lookup[Start of Year] ), 2 ) }Then updated Max Y-Axis to:
Max Y-Axis = VAR SelectedDateParameter = IF ( COUNTROWS ( 'Date Parameter' ) = 1, SELECTCOLUMNS ( 'Date Parameter', 'Date Parameter'[Date Parameter] ) ) RETURN SWITCH ( SelectedDateParameter, "Week", 10, "Month", 20, "Year", 30 )Note that we cannot directly write
SELECTEDVALUE ( 'Date Parameter'[Date Parameter] )(see here).
Finally, replaced the bookmark navigator with a slicer on
'Date Parameter'[Date Parameter].I also recommend disabling Auto date/time.
PBIX attached.
Regards
Hi Cabbage_Baby,
Thankyou OwenAuger for your reply on the issue.
I'm glad to hear that your query was resolved! If the response provided by the community member addressed your concern, kindly confirm.
Marking it as Accept Answer and give us Kudos if you found it helpful allows us to ensure that the solutions shared are valuable for the entire community.
If you have any further questions, feel free to reach out!
Thank you for your cooperation!
- v-sgandrathi1 year ago
Community Support
Hi Cabbage_Baby,
May I ask if you have gotten this issue resolved?
If it is solved, please mark the helpful reply or share your solution and accept it as solution, it will be helpful for other members of the community who have similar problems as yours to solve it faster.
Thank you.
- v-sgandrathi1 year ago
Community Support
Hi Cabbage_Baby,
I wanted to check in your situation regarding the issue. Have you resolved it? If you have, please consider marking the reply as Accepted solution and give Kudos that helped you. It would be greatly appreciated by others in the community who may have the same question.
Thank you.