Forum Discussion

Flo1's avatar
Flo1
Advocate I
3 years ago
Solved

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...
  • Flo1's avatar
    Flo1
    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]
    )