Forum Discussion

fabianfilth's avatar
fabianfilth
Regular Visitor
2 years ago
Solved

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

  • Anonymous's avatar
    Anonymous
    2 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 _ Rongtie

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

     

     

3 Replies