Forum Discussion

Arccc's avatar
Arccc
New Member
4 years ago
Solved

How to find Max value in dax

Hi ,

I am new to dax ...I want to find Max value of data that looks like below. 

Category.   Data.  Sec

A                 50.     Top 

B                 53.      Bottom

C.                64.      Bottom 

D.                51.      Bottom 

Where sec is a measure 

Already used calculate (max(table[data]),filter(table,[sec]="Bottom"))

Ans required is 64 

Data is weekly level ..n have filters for year and month 

 

 

 

 

 

 

 

 

 

 

 

  • Arccc Not sure of what your Sec measure formula is, mine is Measure 15 in the formula below:

    Measure 16 = 
        VAR __Table = 
            FILTER(
                ADDCOLUMNS(
                    SUMMARIZE(
                        'Table16',
                        [Category],
                        "__Sum",SUM('Table16'[Data])
                    ),
                    "__Sec",[Measure 15]
                ),
                [__Sec] = "Bottom"
            )
    RETURN
        MAXX(__Table,[__Sum])

1 Reply

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Arccc Not sure of what your Sec measure formula is, mine is Measure 15 in the formula below:

    Measure 16 = 
        VAR __Table = 
            FILTER(
                ADDCOLUMNS(
                    SUMMARIZE(
                        'Table16',
                        [Category],
                        "__Sum",SUM('Table16'[Data])
                    ),
                    "__Sec",[Measure 15]
                ),
                [__Sec] = "Bottom"
            )
    RETURN
        MAXX(__Table,[__Sum])