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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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.