Forum Discussion
Max Date between more than two dates
Greetings power BI community
I hope you can help me with the following
I have 5 different column dates and I want to calculate the max date betweeen them, is there any dax function that works for this? or how can I achieve this with dax?
thank you for your help
- Anonymous2 years ago
Hi fabianfilth ,
Please have a try.
Max Date = MAXX ( UNION ( ADDCOLUMNS ( 'Table', "Date", MAX ( 'Table'[Date1] ) ), ADDCOLUMNS ( 'Table', "Date", MAX ( 'Table'[Date2] ) ), ADDCOLUMNS ( 'Table', "Date", MAX ( 'Table'[Date3] ) ), ADDCOLUMNS ( 'Table', "Date", MAX ( 'Table'[Date4] ) ), ADDCOLUMNS ( 'Table', "Date", MAX ( 'Table'[Date5] ) ) ), [Date] )Solved: DAX Max value of multiple columns for every row - Microsoft Fabric Community
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ RongtieIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 Replies
- some_bih
Community Champion
Hi fabianfilth
Check link https://goodly.co.in/max-multiple-columns-measures-powerbi-dax/
Hope this help.
- fabianfilthRegular Visitor
Thank you for ur help, but I have a question, what does the [Value] measure as the second argument of the MAXX function refers to? it says that it is the default column name, but I don't get it!
- AnonymousNot applicable
Hi fabianfilth ,
Please have a try.
Max Date = MAXX ( UNION ( ADDCOLUMNS ( 'Table', "Date", MAX ( 'Table'[Date1] ) ), ADDCOLUMNS ( 'Table', "Date", MAX ( 'Table'[Date2] ) ), ADDCOLUMNS ( 'Table', "Date", MAX ( 'Table'[Date3] ) ), ADDCOLUMNS ( 'Table', "Date", MAX ( 'Table'[Date4] ) ), ADDCOLUMNS ( 'Table', "Date", MAX ( 'Table'[Date5] ) ) ), [Date] )Solved: DAX Max value of multiple columns for every row - Microsoft Fabric Community
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ RongtieIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.