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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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