Forum Discussion
shubhamamilkant
Helper II
6 years agoCompare 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
- 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]))))
3 Replies
- amitchandak
Super User
- v-diye-msft
Community Support
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.
- shubhamamilkant
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]))))