Forum Discussion

merlingsf's avatar
merlingsf
Frequent Visitor
6 years ago
Solved

Max value from two columns - Show blanks

Hi,   I am having trouble geting a single max value for a row from three columns in a matrix.   The columns are: Name, Date(Month), Price The Dataset:   Name Month Price A January 75...
  • v-lid-msft's avatar
    6 years ago

    Hi merlingsf ,

     

    We can try to create a measure to meet your requirement:

     

    Measure =
    SUMX (
        DISTINCT ( 'Table'[Month] ),
        VAR result =
            MAXX (
                CALCULATETABLE ( DISTINCT ( 'Table'[Name] ), ALLSELECTED () ),
                CALCULATE ( MAX ( 'Table'[Price] ) )
            )
        RETURN
            IF ( CALCULATE ( MAX ( 'Table'[Price] ) ) = result, result, BLANK () )
    )

     

     


    By the way, PBIX file as attached.


    Best regards,