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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
jensvanbellen
Regular Visitor

Add filter to report to exclude fields from a visual?

Hi everyone, I'm currently trying to add a filter to my report where users can click on and select which fields will be included/excluded in the Stacked Area Chart visual I have in my report. I've sketched my desired situation on the following picture

 

As shown on the picture I'd like to add a filter on the left side in which a user could click on a field e.g. "Website - Pageviews" or "Facebook - Post Impressions", and this would then select/deselect the fields that are included in the visual that I have on this page. I thought this would be a pretty straightforward thing to do, but after messing around in Power BI for a while I have no clue how one could easily do this. I googled this and skimmed through various videos on Power BI filters but so far I haven't come across something that would exclude a field completely from a visual, instead of just filtering data within the fields that are in the visual.

 

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

Hi @jensvanbellen ,

 

As I can see from your screenshot, you created  a measure for each field in sclier and put them in values, the filter was fixed in measure , so you can't  use slicer directly to filter legned.

 

I suggest you create a summary table union all the measure into one table(without your sample data ,I cannot provide a detailed formula). You can  refer to my post in https://community.powerbi.com/t5/Desktop/Multi-Line-Diagram-to-compare-plants-with-categories/td-p/1... 

 

If you need further help, please show me your sample data by onedrive for business.

 

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

 

Best Regards,

Dedmon Dai

 

View solution in original post

2 REPLIES 2
v-deddai1-msft
Community Support
Community Support

Hi @jensvanbellen ,

 

As I can see from your screenshot, you created  a measure for each field in sclier and put them in values, the filter was fixed in measure , so you can't  use slicer directly to filter legned.

 

I suggest you create a summary table union all the measure into one table(without your sample data ,I cannot provide a detailed formula). You can  refer to my post in https://community.powerbi.com/t5/Desktop/Multi-Line-Diagram-to-compare-plants-with-categories/td-p/1... 

 

If you need further help, please show me your sample data by onedrive for business.

 

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

 

Best Regards,

Dedmon Dai

 

Hi @v-deddai1-msft, thanks for your reply. In the meantime I build another solution as well that brings me close to what I initially wanted to accomplish. I made a new table with the Power Query Editor with the listed metrics I wanted the users to select and a key, something like this:

 

MetricKey
Website sessions1
Facebook post impressions2
etc.etc.


Then I added a slicer to the page with the graph where the user can select the Metric from fore-mentioned table. Next I created a new measure in which I used the SWITCH() function to switch out the variable depending on which Metric (and thus Key) the user chose in the slicer. I then use this new measure for the graph I have on the page. The only thing with this now is that so far I can only manage to display one metric at a time in the graph...

 

Thanks for your solution, I will try that as well! 😃

 

The result looks like this.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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