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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
KellyLo
Frequent Visitor

Getting MIN Date based on two fiters

Hello - Hoping for some assistance. I have a column named "Source" and there are two values in this column. The table has two date columns, a date for one source and a date for the other. I need a calculation that will bring the MIN date for each. Example:

ID#1, Source = Email, Email Date = 5/1/2024, 5/2/2024, 5/3/2024.

ID#2, Source = Phone, Phone Date = 5/2/2024, 5/3/2024, 5/4/2024.

ID #3, Source = Phone, Phone Date = 4/1/2024, 5/1/2024, 5/5/2024

I need a calculation that would return this:

ID#1 = 5/1/2024

ID#2 = 5/2/2024

ID#3 = 4/1/2024

 

Is this possible?

 

 

2 ACCEPTED SOLUTIONS

Okay so I created this fact table.

 

fact.PNG

 

Based on this fact table, I created this measure:

 

Min_Date =
VAR mindate_col1 = MIN([CreatedDate])
VAR mindate_col2 = MIN([HasAttachmentDate])
return
IF(mindate_col1 <= mindate_col2, mindate_col1, mindate_col2)
 
And was able to produce this visual:
 
result.PNG


View solution in original post

KellyLo
Frequent Visitor

Perfect! This group is so amazing. I have a meeting this afternoon and was a little concerned this wouldn't get solved in time. THANK YOU SO MUCH!!!

 

View solution in original post

4 REPLIES 4
KellyLo
Frequent Visitor

Of course - Example.JPG

Okay so I created this fact table.

 

fact.PNG

 

Based on this fact table, I created this measure:

 

Min_Date =
VAR mindate_col1 = MIN([CreatedDate])
VAR mindate_col2 = MIN([HasAttachmentDate])
return
IF(mindate_col1 <= mindate_col2, mindate_col1, mindate_col2)
 
And was able to produce this visual:
 
result.PNG


KellyLo
Frequent Visitor

Perfect! This group is so amazing. I have a meeting this afternoon and was a little concerned this wouldn't get solved in time. THANK YOU SO MUCH!!!

 

kpost
Super User
Super User

Could you include a screenshot of a table containing this example data?  It's a bit unclear exactly what values are in what columns and how they are formatted, from what you provided.

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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