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
RiskyBiscutsBro
Frequent Visitor

Top 5 Values of a Specific Month, trailing 12 months with a Date Filter

Good day to you all,

 

I am seeking assistance with a Power BI visual that I've been working on for the past four months. My current solution is not as efficient as I would like it to be and requires a lot of manual adjustments.

 

Objective: To create 5 line charts that update based on a selected date (month and year). The chart should display the count of the top 5 categories, based on their value for the selected month/year. The chart is a TTM ending at the selected date.

 

Current Process: At present, I select the desired month and year, then use the five "Item" filters (which I've adjusted the interactions to affect specific line charts) to display the top 5 items. This produces the desired chart, but with two issues:

1. I have to select an option from five individual "Item" filters, and its order from 1-5, then

2. I have to manually adjust each chart so that the last date corresponds to the month I filtered to produce a dynamic TTM chart.

 

Goal: I want to streamline this process so that it's user-friendly and doesn't require manual adjustments for each chart. I'm looking for a solution that allows the chart to automatically update based on the selected month/year and display the top 5 "Item" for that period.

 

Any guidance on how to achieve this would be greatly appreciated.

 

RiskyBiscutsBro_0-1708547096574.png

 

 

Thank you.

 

 

 

2 REPLIES 2
amitchandak
Super User
Super User

@RiskyBiscutsBro , I think in this case you will need top 5 across all the months selected

 

Create measures like ,Assuming count is measure 

 

M1= calculate([Count], allselected(Table[Month year]))

 

m2 = calculate([Count], Keepfilters(TOPN(5, allselected(Table[item]), [M1], desc) ) )

 

Dynamic TOPN using TOPN/Window and Numeric parameter: https://youtu.be/vm2mdEioQPQ

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

@amitchandak I will give this a shot, thanks for the link. Will update thread if this is a go!

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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.