Forum Discussion
Flo1
3 years agoAdvocate I
Incorrect Max value due to different sorting
Hi Community, I try to create a line chart with Total Sales by Year-Month column and an additionally constant line giving the maximum of Total Sales (Global Max). I have this simple data mode...
- 3 years ago
amitchandak Thank you for your response!
Your solution helps!
I found also another solution. If I sort Year-Month column by YearMonthKey it also helps to include the sort by-column in my measure like here:Global Max = MAXX( ALL('Date'[Year-Month], 'Date'[YearMonthKey]), [Total Sales] )
amitchandak
3 years agoSuper User
Flo1 , Try like
Global Max =
calculate( MAXX(
values('Date'[Year-Month]),
[Total Sales]
), allselected())
Flo1
3 years agoAdvocate I
amitchandak Thank you for your response!
Your solution helps!
I found also another solution. If I sort Year-Month column by YearMonthKey it also helps to include the sort by-column in my measure like here:
Global Max =
MAXX(
ALL('Date'[Year-Month], 'Date'[YearMonthKey]),
[Total Sales]
)