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
Anonymous
Not applicable

Max date for calculated column DAX Measure

Hi Experts

 

How can i modify the following to return back the max date...for FINCNTRL[wostatus.CHANGEDATE]

 

Measure Calculated Column

Works Completion Date = IF(FINCNTRL[wostatus.STATUS] IN {"FINAPPR", "FINCOMP", "COMP", "CLOSE"}, FINCNTRL[wostatus.CHANGEDATE], BLANK())
 
1 ACCEPTED SOLUTION
v-yanjiang-msft
Community Support
Community Support

Hi @Anonymous ,

According to your description, I create a sample. 

vkalyjmsft_0-1664960604591.png

If you want to create a calculated column to show the max date of wostatus.CHANGEDATE when wostatus.STATUS meet the condition, here's my solution. Create a calculated column.

Works Completion Date =
IF (
    FINCNTRL[wostatus.STATUS] IN { "FINAPPR", "FINCOMP", "COMP", "CLOSE" },
    MAXX (
        FILTER (
            'FINCNTRL',
            FINCNTRL[wostatus.STATUS] IN { "FINAPPR", "FINCOMP", "COMP", "CLOSE" }
        ),
        FINCNTRL[wostatus.CHANGEDATE]
    ),
    BLANK ()
)

Get the result.

vkalyjmsft_1-1664960785800.png

I attach my sample below for your reference.

 

Best Regards,
Community Support Team _ kalyj

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

 

View solution in original post

2 REPLIES 2
v-yanjiang-msft
Community Support
Community Support

Hi @Anonymous ,

According to your description, I create a sample. 

vkalyjmsft_0-1664960604591.png

If you want to create a calculated column to show the max date of wostatus.CHANGEDATE when wostatus.STATUS meet the condition, here's my solution. Create a calculated column.

Works Completion Date =
IF (
    FINCNTRL[wostatus.STATUS] IN { "FINAPPR", "FINCOMP", "COMP", "CLOSE" },
    MAXX (
        FILTER (
            'FINCNTRL',
            FINCNTRL[wostatus.STATUS] IN { "FINAPPR", "FINCOMP", "COMP", "CLOSE" }
        ),
        FINCNTRL[wostatus.CHANGEDATE]
    ),
    BLANK ()
)

Get the result.

vkalyjmsft_1-1664960785800.png

I attach my sample below for your reference.

 

Best Regards,
Community Support Team _ kalyj

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

 

AilleryO
Memorable Member
Memorable Member

Hi,

 

Did you try  ?

Works Completion Date = IF(FINCNTRL[wostatus.STATUS] IN {"FINAPPR""FINCOMP""COMP""CLOSE"}, MAX(FINCNTRL[wostatus.CHANGEDATE])BLANK())

Let us know

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.