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
Saadat_Nasibdar
New Member

Dynamic data for max date based on date slicer selection

Hi, I am stuck with a challenge, where I need to show the Latest date of each ID(Each ID has multiple entries at different dates and times), but the catch is, there is a date slicer(Between option), so when we change the date in the slicer, Table should show the latest data based on the slicer. For example, the overall date range is from 01st April 2021 to 31st March 2022, so if the latest date for id 707 is 18th March, only this should display, but if the slicer is changed to 15th Apri1 2021 to 01st March 2022, then the latest date between this should display for ID 707 which may be 25th Feb 2022

Accordingly, with ID 707, we have multiple ids and all should display their latest data as per selection

1 ACCEPTED SOLUTION
v-kkf-msft
Community Support
Community Support

Hi @Saadat_Nasibdar ,

 

Please try the following formula:

 

Measure = 
CALCULATE ( 
    MAX ( 'Table'[Date] ),
    FILTER ( ALLSELECTED ( 'Table' ), 'Table'[ID] = MAX ( 'Table'[ID] ) )
)

vkkfmsft_0-1648090828710.png         vkkfmsft_1-1648090842618.png

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
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-kkf-msft
Community Support
Community Support

Hi @Saadat_Nasibdar ,

 

Please try the following formula:

 

Measure = 
CALCULATE ( 
    MAX ( 'Table'[Date] ),
    FILTER ( ALLSELECTED ( 'Table' ), 'Table'[ID] = MAX ( 'Table'[ID] ) )
)

vkkfmsft_0-1648090828710.png         vkkfmsft_1-1648090842618.png

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

Saadat_Nasibdar
New Member

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.