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

find date and day name related to a max value

Hello All,

 

I need help creating a dax measure to the date related to Max head count. I can use the max function to get the max value but not quite sure how to get the date and the day name related to that max head count.

Please find the raw data table and the output below.

 

Any help is greatly appreciated.

 

Thanks,

 

Deevsimage.png

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , for date name and day, try these two measures

 

lastnonblankvalue(table[headcount]), max(Table[Date]))
lastnonblankvalue(table[headcount]), max(Table[Day Name]))

 

And take the game name and head count as not summarized . or max for head count

View solution in original post

5 REPLIES 5
amitchandak
Super User
Super User

@Anonymous , for date name and day, try these two measures

 

lastnonblankvalue(table[headcount]), max(Table[Date]))
lastnonblankvalue(table[headcount]), max(Table[Day Name]))

 

And take the game name and head count as not summarized . or max for head count

Anonymous
Not applicable

@amitchandak   One more question .. how do you handle if there are more than one max head count? 

Anonymous
Not applicable

You are a Legend Amit 🙂

lbendlin
Super User
Super User

what if you have multiple days with the same maximum headcount? How are you planning to break the tie?

Anonymous
Not applicable

....

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.