cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
datadiver Frequent Visitor
Frequent Visitor

Dynamic most recent value to filter visuals

Hi, 

 

I'm having trouble finding a way to get PowerBI show the most recent value within a category for the purposes of visualisation. I need the way of finding most recent value to be dynamic, as the report will have a time slicer so we can see the 'most recent' value on given dates going backwards. My data looks something like this:

 

Date

Category

Rating

07/10/2019

A

Red

02/10/2019

B

Green

01/10/2019

C

Yellow

22/09/2019

B

Yellow

22/09/2019

A

Yellow

15/09/2019

C

Green

 

And I might have a bar chart that counts the number of Red/Green/Yellowon a specific date (determined by a date slicer on the page), based on the most recent value within the A, B, C categories.

 

So if the date is set at 23rd September 2019, the bar chart would show 2 Yellow, 1 green and 0 reds. 

 

Hope this makes sense and any help would be much appreciated

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Dynamic most recent value to filter visuals

Hi @datadiver ,

 

Please let me know if you'd like to get the results like this:

001.PNG

I added another calendar table as slicer, then add the measures to filter the recent rating which within A/B/C category, note that measure4 is not blank. please find the pbix here: https://wicren-my.sharepoint.com/:u:/g/personal/dinaye_wicren_onmicrosoft_com/EfCWbzJAx0tPgjbKNQDWpA...

Community Support Team _ Dina Ye
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

4 REPLIES 4
Community Support Team
Community Support Team

Re: Dynamic most recent value to filter visuals

Hi @datadiver ,

 

Please let me know if you'd like to get the results like this:

001.PNG

I added another calendar table as slicer, then add the measures to filter the recent rating which within A/B/C category, note that measure4 is not blank. please find the pbix here: https://wicren-my.sharepoint.com/:u:/g/personal/dinaye_wicren_onmicrosoft_com/EfCWbzJAx0tPgjbKNQDWpA...

Community Support Team _ Dina Ye
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

datadiver Frequent Visitor
Frequent Visitor

Re: Dynamic most recent value to filter visuals

Hi @v-diye-msft ,

 

Thank you for taking the time to look at this and provide a response. 

 

Unfortunately, Measure 4, which I think you have used to filter the table, has a syntax error when I have downloaded the .pbix you provided, so it doesn't seem to solve my problem. 

 

Also, does this aoproach work with visuals (e.g. a bar chart) rather than just tables? 

 

 

Community Support Team
Community Support Team

Re: Dynamic most recent value to filter visuals

Hi @datadiver ,

 

Sorry I uploaded the incomplete one before, please try below link:

 

https://wicren-my.sharepoint.com/:u:/g/personal/dinaye_wicren_onmicrosoft_com/EQddvrOVZ49Hn3UsTWEA2e...

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
Community Support Team
Community Support Team

Re: Dynamic most recent value to filter visuals

Hi @datadiver ,

 

If my above post helps, could you please consider Accept it as the solution to help the other members find it more quickly. thanks!

Best regards,
Dina Ye

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

Helpful resources

Announcements
October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 287 members 3,018 guests
Please welcome our newest community members: