Forum Discussion
Measure as a drop down slicer
Hi,
There is a measure "TotalCost" which used in table visual along with few other columns. I want to filter the table visual by using the same measure in dropdown slicer with multiselect option.
I have created a calculated table using below dax:
4 Replies
- AnonymousNot applicable
Anonymous Please try this one:
Slicer Measure = VAR Table1 = SUMMARIZE( Product, Product[ProductName], Product[ProductNumber], "TotalCost", [TotalCost] ) RETURN Table1
Measure Filter =
VAR SelectedTotalCosts = VALUES('Slicer Measure'[TotalCost])
VAR CurrentMeasureValue = [TotalCost]
RETURN
IF( COUNTROWS
( FILTER
( SelectedTotalCosts, CurrentMeasureValue = [TotalCost] )
) > 0, 1, 0 ) - AnonymousNot applicable
I have tried to change the "Measure Filter" like this:
Measure Filter =VAR SlicerValue = SUMMARIZE('Slicer Measure','Slicer Measure'[TotalCost])VAR CurrentMeasureValue = [TotalCost]RETURNIF(CurrentMeasureValue inSlicerValue ,1,0)It gives me the expected result on the table visual but in the slicer there are few duplicated values. Can anyone suggest what need to do to remove these duplicate values in the slicer.Thanks- AnonymousNot applicable
Anonymous Please try this one.
https://community.fabric.microsoft.com/t5/Desktop/Slicer-showing-duplicates/td-p/2871271
- AnonymousNot applicable
Anonymous Please try this one:
Slicer Measure = VAR Table1 = SUMMARIZE( Product, Product[ProductName], Product[ProductNumber], "TotalCost", [TotalCost] ) RETURN Table1
Measure Filter =
VAR SelectedTotalCosts = VALUES('Slicer Measure'[TotalCost])
VAR CurrentMeasureValue = [TotalCost]
RETURN
IF( COUNTROWS
( FILTER
( SelectedTotalCosts, CurrentMeasureValue = [TotalCost] )
) > 0, 1, 0 )