Forum Discussion
Slicer to switch between 2 columns
- 7 years ago
Anonymous create another table with these two options and this table be not have relationship with anything, put column from this table as a slicer and use following dax to switch between values.
Change table name/column name in following dax as per your data model. Now you can use following "Amount" measure in your visuals and value will change based on option selected on the slicer.
Hope it is helpful
Amount = VAR __selectedSlicer = SELECTEDVALUE( NewTable[Slicer] ) RETURN IF( __selectedSlicer = "Incl. Tax", SUM( Table[InclAmount] ), SUM( Table[ExclAmount] ) )
Anonymous create another table with these two options and this table be not have relationship with anything, put column from this table as a slicer and use following dax to switch between values.
Change table name/column name in following dax as per your data model. Now you can use following "Amount" measure in your visuals and value will change based on option selected on the slicer.
Hope it is helpful
Amount = VAR __selectedSlicer = SELECTEDVALUE( NewTable[Slicer] ) RETURN IF( __selectedSlicer = "Incl. Tax", SUM( Table[InclAmount] ), SUM( Table[ExclAmount] ) )
Thanks voor the quick reply, this worked exactly as I wanted. Much appreciated!