Forum Discussion

info_algoritmia's avatar
2 years ago
Solved

Return highest value from a visual table

Hey there,

 

I need a measure that returns the highest value from the current visual table, take a look at the screenshot below

 

 

I have date and total sales in columns, I need the measure that could return the highest value on my table based on the filters applied, when filter changes I also want the measure to show the new "highest value" based on filters.

 

  • info_algoritmia I see, try this:

     

    SWITCH ( TRUE (),
      ISINSCOPE ( DateTable[Date], MAXX ( ALLSELECTED ( DateTable[Date] ), [Sales] ),
      ISINSCOPE ( DateTable[Month], MAXX ( ALLSELECTED ( DateTable[Month] ), [Sales] ),
      <<else condition>>
    )

7 Replies

  • info_algoritmia I see, try this:

     

    SWITCH ( TRUE (),
      ISINSCOPE ( DateTable[Date], MAXX ( ALLSELECTED ( DateTable[Date] ), [Sales] ),
      ISINSCOPE ( DateTable[Month], MAXX ( ALLSELECTED ( DateTable[Month] ), [Sales] ),
      <<else condition>>
    )
    • info_algoritmia's avatar
      info_algoritmia
      Helper II

      hey parry2k  it worked but I need the value to be dynamic, I utilized the "calendar table" in the ALL SELECTED, and it works for dates, but when I changed the dates for months it's still showing the max per date instead of month, how could I modify this automatically? I want the max value for the current filters and columns I have in the table visual, not only for dates (daily)

    • info_algoritmia's avatar
      info_algoritmia
      Helper II

      parry2k   it works when date column is in the visual, but if I changed it to "Months", look, the "51700" is the highest sales value for "dates", not for "months", how can I update this and make it dinamyc? I'd want know to show the "230400" for February isntead