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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
shubhamamilkant
Helper II
Helper II

Compare Dates and Find minimum in table

I have a table with 3 Columns (date datatype) and I need to create new column, which will give me minimum of these 3 column (smallest date)

I can use if else for 2 comparing columns, Is there is a function which i can used to compare the dates with more than 2 columns instead of if-else .

 

ex - 

Col A - 10/1/2020

Col B - 7/1/2020

Col C - 8/1/2020

Result column - 7/1/2020

Thanks in Advance,

 

Shubham

1 ACCEPTED SOLUTION
shubhamamilkant
Helper II
Helper II

This is the answer i used to find min date 
SLA Tracker is table name,
COL A, COL B, COL C are 3 different columns with Date data type

IF('sla tracker'[Col A]=BLANK(),COALESCE('sla tracker'[COL B],'sla tracker'[COL C]),
IF('sla tracker'[COL B]=BLANK(),COALESCE('sla tracker'[COL A],'sla tracker'[COL C]),
IF('sla tracker'[COL C] = BLANK(),COALESCE('sla tracker'[COL A],'sla tracker'[COL B]),
MIN(MIN('sla tracker'[COL A],'sla tracker'[COL B]),'sla tracker'[COL C]))))

View solution in original post

3 REPLIES 3
shubhamamilkant
Helper II
Helper II

This is the answer i used to find min date 
SLA Tracker is table name,
COL A, COL B, COL C are 3 different columns with Date data type

IF('sla tracker'[Col A]=BLANK(),COALESCE('sla tracker'[COL B],'sla tracker'[COL C]),
IF('sla tracker'[COL B]=BLANK(),COALESCE('sla tracker'[COL A],'sla tracker'[COL C]),
IF('sla tracker'[COL C] = BLANK(),COALESCE('sla tracker'[COL A],'sla tracker'[COL B]),
MIN(MIN('sla tracker'[COL A],'sla tracker'[COL B]),'sla tracker'[COL C]))))
v-diye-msft
Community Support
Community Support

Hi @shubhamamilkant 

 

You might consider providing your dummy pbix that would be helpful for us to investigate it further. 

You can upload it to the onedrive for business and share the link here. please don't forget to disclose the expected results and remove the confidential info.

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
amitchandak
Super User
Super User

@shubhamamilkant , not very clear

 

you have if else or Switch , Switch True()

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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