Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe 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.
Hi everyone,
I don't know if it's a bug in the Power Bi Slicer or if I'm doing something wrong.
I need to create a data slicer to vary the data between the minimum and maximum value for a specific product, so I created a Slicers for him.
When I set the maximum value, it removes all contracts from the SQSLL product, but if I set the minimum SQSLL value, it removes all contracts from other products.
I looked for a solution and didn't find it.
Could someone help me with this please?
Power BI Sales slicer Product.pbix
thanks
Solved! Go to Solution.
You only have a single table. Your slicers will overlay (ie both will be applied together) when they filter your data.
Use disconnected tables for your slicer and then use measures as visual filters for your tables A and B.
Hi @lbendlin ,thanks for your quick reply, I will add more.
Hi @mscla ,
As @lbendlin said, you need to create a disconnected table for slicer.
Please follow these steps:
1.Use the following DAX expression to create a table.
Table = CALCULATETABLE(VALUES('table Sales'[Sales]),'table Sales'[Product] = "CQSSL")
2.Use the following DAX expression to create a measure
Measure =
VAR _product = SELECTEDVALUE('table Sales'[Product])
VAR _minforSlicer = MIN('Table'[Sales])
VAR _maxforSlicer = MAX('Table'[Sales])
VAR _result = IF(_product <> "CQSSL",
SUM('table Sales'[Sales]),
SUMX(FILTER('table Sales','table Sales'[Sales] >= _minforSlicer && 'table Sales'[Sales] <= _maxforSlicer),[Sales])
)
RETURN _result
3.Final out put
Best Regards,
Wenbin Zhou
If this post helps, please mark me and @lbendlin as the solution.
Thank you very much @lbendlin and @v-zhouwen-msft
Really appreciate your help, and its really worked!
My goal is to have a slicer for each product that the user can increase or decrease for each product. so, I created a combinedMeasure and its working
Hi @lbendlin ,thanks for your quick reply, I will add more.
Hi @mscla ,
As @lbendlin said, you need to create a disconnected table for slicer.
Please follow these steps:
1.Use the following DAX expression to create a table.
Table = CALCULATETABLE(VALUES('table Sales'[Sales]),'table Sales'[Product] = "CQSSL")
2.Use the following DAX expression to create a measure
Measure =
VAR _product = SELECTEDVALUE('table Sales'[Product])
VAR _minforSlicer = MIN('Table'[Sales])
VAR _maxforSlicer = MAX('Table'[Sales])
VAR _result = IF(_product <> "CQSSL",
SUM('table Sales'[Sales]),
SUMX(FILTER('table Sales','table Sales'[Sales] >= _minforSlicer && 'table Sales'[Sales] <= _maxforSlicer),[Sales])
)
RETURN _result
3.Final out put
Best Regards,
Wenbin Zhou
If this post helps, please mark me and @lbendlin as the solution.
You only have a single table. Your slicers will overlay (ie both will be applied together) when they filter your data.
Use disconnected tables for your slicer and then use measures as visual filters for your tables A and B.
User | Count |
---|---|
121 | |
69 | |
67 | |
57 | |
50 |
User | Count |
---|---|
176 | |
83 | |
69 | |
65 | |
54 |