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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors