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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
LillyLegenda
Helper III
Helper III

DAX Measure to filter dynamically on latest date not working

Good morning,

 

I would like to show the following timeline chart next to a chart which is showing the largest partners, but only of the latest month..

LillyLegenda_0-1646227170466.png

LillyLegenda_1-1646227214674.png

As you can hopefully see: In 3-2022 the value is 0.6M but the largest partner has 2.6M.

Here is the DAX I am using for the Partner Chart:

 

Measure 1 Latest = 
VAR Latest = [Max Import Date] //MAX(Report[ImportDate])
Return CALCULATE(
'Key Measures'[Measure 1],
FILTER(
Report,
Report[ImportDate] = Latest
)
)
It seems like it is working for the sum but not if I add the Partner.
LillyLegenda_2-1646227499823.png

I would like to be able to click on a Partner and see timeline changing for all months. Is this possible?

 

Do you have an idea what is wrong with my code?

 

Thanks!! 🙂

 

 

3 REPLIES 3
V-lianl-msft
Community Support
Community Support

Hi @LillyLegenda ,

 

How is Measure 1 calculated? The calculation of Measure 1 may cause this problem.

Could you share a sample pbix after deleting sensitive data so that we can check  the problem.

 

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

amitchandak
Super User
Super User

@LillyLegenda , try like

 


Measure 1 Latest =
VAR Latest = MAXX(allselected(Report), Report[ImportDate])
Return CALCULATE(
'Key Measures'[Measure 1],
FILTER(
Report,
Report[ImportDate] = Latest
)
)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thanks for your answer but this is not helping. The latest date stored in the variable is working fine.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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