Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
Hi folks,
I am currently building a sales report which has one Sales Summary containing data as below:
And one item category classification sheet as below:
And one cost sheet as below:
Using these sheets, I have created multiple Measures.
Now, I want to filter the data using item category criteria. Some examples of criteria are Sales without Item category A, Sales of item category A and item category B, etc. There are some fixed criteria by which I want the reports to be filtered.
As this can be achieved by using filters for the page. However, it could be more user-friendly as the item categories are multiple and the criterias are only few.
Kindly suggest a way to use a slicer or button based on the criterias.
Thanks
Solved! Go to Solution.
Hi @deepguptaac
If you want to custom filter buttons, I think field parameter is suitable for you. Here's my sample.
My test table:
Create some measures of criteria you want to filter:
Without Item category A = CALCULATE(SUM('Table'[Sales]),FILTER('Table','Table'[Item category] <> "Item category A"))
Item category A & B = CALCULATE(SUM('Table'[Sales]),FILTER('Table','Table'[Item category] = "Item category A" || 'Table'[Item category] = "Item category B"))
Item category C = CALCULATE(SUM('Table'[Sales]),FILTER('Table','Table'[Item category] = "Item category C"))
Enable field parameters:
Create field parameters:
You will get a parameter table like this:
Then you can use the field paramter to create slicer to filter your report:
Best regards,
Yadong Fang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @v-yadongf-msft ,
Thanks for the solution.
However, this solve my problem partially only as I have more than 100 measures calculating sales performance. So, I will have to create all the measures again adding filters.
I was looking for a universal slicer which accordingly filters all the measures present on a certain pages similar to the functionality of filter pane.
Hi @deepguptaac ,
You don't need to create all the measures again to add filters. You just only need to add measures to field parameters.
Since you have created all the measures, field parameters is very convenient for you.
Best regards,
Yadong Fang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @deepguptaac
If you want to custom filter buttons, I think field parameter is suitable for you. Here's my sample.
My test table:
Create some measures of criteria you want to filter:
Without Item category A = CALCULATE(SUM('Table'[Sales]),FILTER('Table','Table'[Item category] <> "Item category A"))
Item category A & B = CALCULATE(SUM('Table'[Sales]),FILTER('Table','Table'[Item category] = "Item category A" || 'Table'[Item category] = "Item category B"))
Item category C = CALCULATE(SUM('Table'[Sales]),FILTER('Table','Table'[Item category] = "Item category C"))
Enable field parameters:
Create field parameters:
You will get a parameter table like this:
Then you can use the field paramter to create slicer to filter your report:
Best regards,
Yadong Fang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
119 | |
113 | |
72 | |
64 | |
46 |