Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

MAX help

Hello Community. 

 

I have a table like this

 

SharesDate
101/02/2003
202/02/2003
403/02/2003
504/02/2003
305/02/2003
4706/02/2003
107/02/2003
5408/02/2003
75609/02/2003
110/02/2003
211/02/2003

 

I need to find the date when the max shares is located using DAX. Help please.

 

Thank you.

  • Anonymous

     

    Hi, you can obtain in a card using this measure:

     

    Measure =
    VAR MaxShare =
        MAX ( Table1[Shares] )
    RETURN
        CALCULATE ( MAX ( Table1[Date] ); Table1[Shares] = MaxShare )

    Regards

     

    Victor

2 Replies

  • waltheed's avatar
    waltheed
    Impactful Individual

    Is this what you mean?

     

    This is the dax expression:

     

    Max Shares Date = 
    	calculate(
    MAX(Table1[Date]),
    FILTER(Table1,Table1[Shares] = MAX(Table1[Shares])),
    ALL(Table1[Date])
    )

     

     

  • Vvelarde's avatar
    Vvelarde
    Community Champion

    Anonymous

     

    Hi, you can obtain in a card using this measure:

     

    Measure =
    VAR MaxShare =
        MAX ( Table1[Shares] )
    RETURN
        CALCULATE ( MAX ( Table1[Date] ); Table1[Shares] = MaxShare )

    Regards

     

    Victor