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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

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
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.

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!

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!

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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.