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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Top N stacked bar graph does not filter the values based on additional filter

here is an example.

 

I have 3 countries.
Each country has some regions.
Each region has temperatures for each month.

 

I want to show the stacked graph to show the TOP5 regions with highest temperatures for last 6 months

As we know topN pulls whole data, sorts to find top N and simply shows the values for those categories ( regions) over 6 month period.

 

Now,I want to apply the filter of countries. I want the TopN to look for the data from only selected countries, apply the Top5 logic only for temperatures for regions from selected countries and replot.

 

I noticed this does not work as expected above.

 

Does anyone know how to solve this?

 

-SuG

 

4 REPLIES 4
amitchandak
Super User
Super User

Anonymous
Not applicable

TopN_DataSample.png

Hi @Anonymous, 

 

You can create a measure below: 

 

Measure = CALCULATE(SUM('Table'[Amount]),FILTER('Table','Table'[Country]=MAX('Table'[Country])&&'Table'[State/Province]=MAX('Table'[State/Province])))
 
Then set a TopN filter for chart based on this measure: 
 
q3.PNG
 
Best Regards,
Qiuyun Yu
Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-qiuyu-msft
Community Support
Community Support

Hi @Anonymous, 

 

Would you please share some sample data then clarify corresponding result? 

 

Best Regards,
Qiuyun Yu

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

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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