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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
PG86
New Member

Dynamic Filter on date to show only the most recent record

Hello,

 

I am a bit newer to PowerBI and have a question on dynamic filters. I am trying to create a filter for my report that will dynamically alter my visuals only showing the most recent record according to date. If I have the following three ReviewID's of 4212, 42130, and 40496

PG86_0-1681820472334.png

 

and I set my slicer to show me anything between between 1/25/23 to 3/22/23 I only want to see the most recent row for each record which would be 

PG86_1-1681820561286.png

If I change my slicer to use 1/25/23 to 3/19/23 I would like the ReviewID of 42130 to now show this record since it is now the newest record that falls within the filter range

PG86_2-1681820732666.png

 

Also to note I do not want the Updated Date in my visuals and only want the data associated with the most recent ReviewID and Updated Date which I can get using the Threedimensionalreviewid. I am using a stored procedure as well and unless it has changed I saw that I cannot pass dynamic filters into a sproc and only into a direct query.

Is there a way to do this within PowerBI or is it best handled in my sproc and have the end user update parameters and refresh the report if they want to change dates?

1 REPLY 1
amitchandak
Super User
Super User

@PG86 , Refer code below and Check if the blog on the same concept can help

 

example

 

Last Status = var _max = maxx(filter(ALLSELECTED(Data), Data[reviewID] = Max(Data[reviewID])), Data[UpdatedDate]) 
return 
CALCULATE(max(Data[Threedimensionreviewid]), filter((Data) ,  Data[UpdatedDate] =_max))

 

Latest
https://amitchandak.medium.com/power-bi-get-the-last-latest-value-of-a-category-d0cf2fcf92d0

https://amitchandak.medium.com/power-bi-get-the-sum-of-the-last-latest-value-of-a-category-f1c839ee8...

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.