Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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.

1 ACCEPTED SOLUTION
Vvelarde
Community Champion
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




Lima - Peru

View solution in original post

2 REPLIES 2
Vvelarde
Community Champion
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




Lima - Peru
waltheed
Solution Supplier
Solution Supplier

Is this what you mean?

 

Capture.PNG

This is the dax expression:

 

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

 

 

Cheers, Edgar Walther
ITsmart BI and Analytics consultant

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.