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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
arun2001mjl
Helper II
Helper II

Show Legends according to the Filter Selected by User in Stacked Column Chart.

Hello All,

I need a help in Stacked Column Chart Legends.

 

I have a Products more than 60. Iam using Rankx function to Calculate Top 10 Products  and remaining to be Tagged as "Remaining Products". Iam using Product name in "Stacked Column Chart" Legend.

I created a Table in PowerBI using below column measure.

1) Product Name = SUMMARIZE(Sheet1,Sheet1[Product Name],"Count of Product's",CALCULATE(COUNT(Sheet1[Product Name])))
2) Rank Product = RANKX('Product Name', 'Product Name'[Count of Product's])
3) Top 10 Product's = IF('Product Name'[Rank Product] <=10,'Product Name'[Product Name],"Remaining Product's")


Iam getting a correct output for whole data but when i filter by Customer or Priority or Open date or any other filters. It is not working. RANKX appearing as a Static Value. May i know how to change it to Dynamic Value?

arun2001mjl_1-1671379599299.png

 

When i used any filter, Top 10 is not working. I filter account as AAA1 and see the output which is not correct.

 

arun2001mjl_0-1671379524824.png

Actually i want, all 4 Products to be considered under Top 10 and show the result.

 

I tried both the solutions in tutorials but it is not working as expected.

 

I have uploaded the sample pbix file in below Google Drive.
https://drive.google.com/drive/folders/12xHDs8dow8_v0FbPZws_r5vQw9ZbRZ6r

 

Please do the needful/.

3 REPLIES 3
arun2001mjl
Helper II
Helper II

Hello All,

 

Could you please help on this solution. Iam still unable to get a fix for my case. If anyone need Sample .pbix file, let me know.. I will share via google drive.

 

Regards

Arun

ahmadibrahimbus
Resolver III
Resolver III

Dear @arun2001mjl ,

please use the below link:

Filtering the top products alongside the other products in Power BI - SQLBI

I'am sure it will helps.

Kindly remark it as an accepted solution if this is helps.

Hi,

For my case, it is not working. Can you create a sample pbi with the data i shared, pls.

 

Regards

Arun Kumar L

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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