Forum Discussion
Anonymous
7 years agoNot applicable
Slicer to switch between 2 columns
Hi, I want to create a slicer to switch between 2 columms, which are displayed in the visuals. One column contains the invoice amount including taxes (21%), the other column contains the same invo...
- 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
6 years agoNot applicable
Never mind my question... but for other people's reference, the DAX needs to be a measure. Perhaps that was obvious and I'm still too new to Power BI 🙂
parry2k
Super User
6 years agoAnonymous In my reply, I mentioned Amount Measure but glad issue is resolved and that is the best way to learn. Cheers!!