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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Dax expression to display the latest date in the Matrix Visual

My Test data

Name   type     Modifieddate   Other Columns
-------------------------------------------------------
A       type1   1/1/2021
A       type2   1/1/2021
B       type3   1/2/2021
B       type1   1/2/2021
C       type1   1/3/2021
A type1 1/3/2021 A type3 1/3/2021 B type2 1/4/2021

My Matrx output expected.

         

 Type1Type2Type3

A

1/3/20211/1/20211/3/2021
B1/2/20211/4/20211/2/2021
C1/3/2021  

 

Is there a dax measure that would achieve this?

 

Thanks!

1 ACCEPTED SOLUTION
ERD
Community Champion
Community Champion

Hi @Anonymous ,

You can try this measure:

LatestDate =
VAR selectedName = SELECTEDVALUE ( T[Name] )
VAR selectedType = SELECTEDVALUE ( T[type] )
RETURN
    CALCULATE (
        MAX ( T[Modifieddate] ),
        T[Name] = selectedName,
        T[type] = selectedType
    )

If this post helps, then please consider Accept it as the solution โœ”๏ธto help the other members find it more quickly.

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your Kudos๏‘.

Check out my latest demo report in the data story gallery.

Stand with Ukraine!


Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/

Thank you!

View solution in original post

4 REPLIES 4
ERD
Community Champion
Community Champion

Hi @Anonymous ,

You can try this measure:

LatestDate =
VAR selectedName = SELECTEDVALUE ( T[Name] )
VAR selectedType = SELECTEDVALUE ( T[type] )
RETURN
    CALCULATE (
        MAX ( T[Modifieddate] ),
        T[Name] = selectedName,
        T[type] = selectedType
    )

If this post helps, then please consider Accept it as the solution โœ”๏ธto help the other members find it more quickly.

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your Kudos๏‘.

Check out my latest demo report in the data story gallery.

Stand with Ukraine!


Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/

Thank you!

Anonymous
Not applicable

@ERD 

It's retuning the date data 12/31/2021 12:00:00 AM

ERD
Community Champion
Community Champion

ERD_0-1631630942800.png

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your Kudos๏‘.

Check out my latest demo report in the data story gallery.

Stand with Ukraine!


Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/

Thank you!

Anonymous
Not applicable

It Worked!! Thanks @ERD  

The earlier issue is due to my data model which caused the Date field to return inconsistent data. After referring to right columns the Dax you shared had worked.

Helpful resources

Announcements
November Fabric Update Carousel

Fabric Monthly Update - November 2025

Check out the November 2025 Fabric update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Users online (25)