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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Vishruti
Helper I
Helper I

DAX to get Min date based on other columns

I have following data where there are multiple claim IDs.
For a single claim ID there are different dates and different claim types.

IMG_0896.jpeg


I need to get the Minimum date for a particular Claim ID and Claim Type.
Eg. I need following result in a table.

IMG_0895.jpeg


How to get this through DAX? Do I need to create a measure or a calculated column?

1 ACCEPTED SOLUTION
Arul
Super User
Super User

@Vishruti ,

try this measure,

Min Claim Date = CALCULATE(
     MIN('Table'[Claim Date]),
     ALLEXCEPT('Table','Table'[Claim ID],'Table'[Claim Type]))

Arul_0-1716533291282.png





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


LinkedIn


View solution in original post

3 REPLIES 3
Arul
Super User
Super User

@Vishruti ,

try this measure,

Min Claim Date = CALCULATE(
     MIN('Table'[Claim Date]),
     ALLEXCEPT('Table','Table'[Claim ID],'Table'[Claim Type]))

Arul_0-1716533291282.png





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


LinkedIn


Hello @Arul 

Thank you. I got the values.

Can you also tell how I can get Max along with Min dates? With the same logic?

AnalyticPulse
Super User
Super User

hello @Vishruti 

use below dax for calculated column;
MinimumDate =
VAR MinDate = CALCULATE(MIN('Claim Table'[Date]), ALLEXCEPT('Claim Table', 'Claim Table'[Claim ID], 'Claim Table'[Claim Type]))
RETURN IF(ISBLANK(MinDate), BLANK(), MinDate)

 

 

use below dax for measure:
MinimumDateMeasure =
MINX(
VALUES('Claim Table'[Claim ID] & "-" & 'Claim Table'[Claim Type]),
CALCULATE(MIN('Claim Table'[Date]))
)

Learn Power BI free:

https://analyticpulse.blogspot.com

Power BI : getting started

Dax functions

powerbi Visualisation

AnalyticPulse_0-1715829624787.png

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.