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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Top N slicer to filter multiple different visuals

I've followed the exact method below to create a Top N slicer for my column chart

https://community.powerbi.com/t5/Desktop/default-slicer-top-N-value/m-p/858465#M411869

Also similar to this method: https://www.youtube.com/watch?v=wKfPS1yZfE0&ab_channel=AviSingh-PowerBIPro 

 

So far I've got it to work with charts. I'd also like to make it work simultaneously with cards as well. I made a chart with Vendors in descending order by their Amount. As you can see in the image, I'd like the card to display the total Amount made up by the top selected N Vendors, because currently it is showing the total of every single Vendor.

 

help1.PNG

 

The Measure Amount has the following DAX code:

Amount = DISTINCTCOUNT('Invoices'[Id])

Invoices in 'Invoices' table are all unique, but many invoices can have the same Vendor.

 

I also made a Top N table from what-if parameters (image below), which automatically added the slicer as you could see from the image above.

help3.PNG

The slicer selection uses the following measure:

Top N Value = SELECTEDVALUE('Top N'[Top N])

To rank the Vendors by their Amount I then created this measure:

Rank By Amount = 

RANKX(ALL('Invoices'[Vendor]), [Amount],,DESC)

And to connect the dots, in other words to check which vendors belong on the filtered Top N range, this measure was made:

Vendor Top N Filtered = IF([Rank By Amount] <= [Top N Value],1,0)

However, whenever I add the Vendor Top N Filtered measure to the card's visual filters, it doesn't let me change the filtering options.

With the chart it works: 

help5.PNG

...but with the card it doesn't.

help4.PNG

 

Any help is appreciated. Greetings from Finland, have a nice weekend!

1 ACCEPTED SOLUTION
v-lionel-msft
Community Support
Community Support

Hi @Anonymous ,

 

The card visual does have this limitation, maybe you can create another measure for the card visual and add the necessary filter conditions in the formula.

v-lionel-msft_0-1621847014827.png

 

Best regards,
Lionel Chen

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

1 REPLY 1
v-lionel-msft
Community Support
Community Support

Hi @Anonymous ,

 

The card visual does have this limitation, maybe you can create another measure for the card visual and add the necessary filter conditions in the formula.

v-lionel-msft_0-1621847014827.png

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors