Forum Discussion
Same column, multiple filters
- 6 years ago
Hi PBIfanatic ,
We can create a measure to meet your requirement.
The measure calculate the sum total between [Slicer_value 1] and [Slicer_value 2].
Slicervalue total = var _selected1 = VALUES('Slicer 1'[Group]) var _selected2 = VALUES('Slicer 2'[Group]) var _value1 = CALCULATE(SUM('Table'[value]),FILTER('Table', 'Table'[Group] in _selected1)) var _value2 = CALCULATE(SUM('Table'[value]),FILTER('Table', 'Table'[Group] in _selected2)) return _value1 + _value2If it doesn’t meet your requirement, could you please show the exact expected result based on the table that we have shared?
BTW, pbix as attached.
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi PBIfanatic ,
We can create two tables and two measures to meet your requirement.
We create a sample, and want to see both selections have performed over time.
1. Create two tables that contain the distinct field you want to add a slicer. For the example, we want to add the GROUP field in slicer, so we need to create two Group tables.
Slicer 1 = DISTINCT('Table'[Group])Slicer 2 = DISTINCT('Table'[Group])
2. Then we create a line chart based on two measures.
Slicer_value 1 =
var _selected = VALUES('Slicer 1'[Group])
var _value = CALCULATE(SUM('Table'[value]),FILTER('Table', 'Table'[Group] in _selected))
return
_valueSlicer_value 2 =
var _selected = VALUES('Slicer 2'[Group])
var _value = CALCULATE(SUM('Table'[value]),FILTER('Table','Table'[Group] in _selected))
return
_value
If it doesn’t meet your requirement, could you please provide a mockup sample based on fake data?
It will be helpful if you can show us the exact expected result based on the tables.
Please upload your files to OneDrive For Business and share the link here. Please don't contain any Confidential Information or Real data in your reply.
BTW, pbix as attached.
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- PBIfanatic6 years agoHelper V
Thanks v-zhenbw-msft , thats awesome.
Its very close to what I need, is there a way to show the selected dimensions in the chart?
If I have a single selection from Slicer 1 and I select 3 from Slicer 2, is it possible to show all these 4 selections as separate lines in the chart?
- v-zhenbw-msft6 years agoCommunity Support
Hi PBIfanatic ,
We can create a measure to meet your requirement.
The measure calculate the sum total between [Slicer_value 1] and [Slicer_value 2].
Slicervalue total = var _selected1 = VALUES('Slicer 1'[Group]) var _selected2 = VALUES('Slicer 2'[Group]) var _value1 = CALCULATE(SUM('Table'[value]),FILTER('Table', 'Table'[Group] in _selected1)) var _value2 = CALCULATE(SUM('Table'[value]),FILTER('Table', 'Table'[Group] in _selected2)) return _value1 + _value2If it doesn’t meet your requirement, could you please show the exact expected result based on the table that we have shared?
BTW, pbix as attached.
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- shrutik3 years agoFrequent Visitor
Hey,I have multiple slicers from multiple columns.Can this work for the same?