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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
C097986
Helper I
Helper I

return max date from mulitple colums only if all 4 columns have a date present

Hey guys,

       so i researched all over and i cannot get this formula to work.

I'm trying to get a date that shows the max date from 4 different columns, only if all 4 columns have dates present in them.

what i get is that i can get the max date of the 4 columns regardless if all 4 columns are completed or not.

for eg.

Capture.PNGso like you see in this picture, if there are 3 dates completed or even 1 date completed, it still give me a result in the last column. i only want it to give a result if all 4 columns are completed.

how can i alter this formula? any help would be appreciated.

 

Final_Approved_Time = Max(Max(AEF_REQUEST_FORM_DATA[PAIImpApproved],AEF_REQUEST_FORM_DATA[SAImpApproved]),Max(AEF_REQUEST_FORM_DATA[RGImpApproved],AEF_REQUEST_FORM_DATA[CIImpApproved]))

3 REPLIES 3
Greg_Deckler
Community Champion
Community Champion

Use my MC Aggregations Quick Measure and insert a COUNTROWS check to make sure that you have 4 rows.

 

https://community.powerbi.com/t5/Quick-Measures-Gallery/Multi-Column-Aggregations-MC-Aggregations/m-...

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

i came across another problem when i use this formula to achieve the above problem.

Final_Approved_Time = IF(AEF_REQUEST_FORM_DATA[STATUS]="Approved",Max(Max(AEF_REQUEST_FORM_DATA[PAImpApproved],AEF_REQUEST_FORM_DATA[SAImpApproved]),Max(AEF_REQUEST_FORM_DATA[RGImpApproved],AEF_REQUEST_FORM_DATA[CIImpApproved])),0)

 

Capture.PNG

this is the data that i get when i use the above formula. As you can see that it gives me the right value when all 4 colums are filled: 7/10/2018. But when it's any other case, then it just give me a generic value of 12/30/1899. i put in the formula that i want to see a 0 or even blank is ok instead of this value, but i dont know where i went wrong.

 

can anyone help me through this?

thank you in advance.

thank you. this helped a lot. i aggregated, then used a count with a max. it worked. thank you

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors