Forum Discussion
Slicer to change column value selected
Hi Guru's
Need some Dax help.
I need to create a column that will change the values based on the value selected in the slicer.
Table'Region Name' is created to be used as the slicer.
based on the region, if user selects "East" as a region, then 'Data'[Region East] column data must display.
Appreciate the help.
We can write a measure to return the Region Owner like this.
Region Owner = VAR _Region = SELECTEDVALUE ( 'Region Name'[Regions] ) RETURN SWITCH( _Region, "East", SELECTEDVALUE ( Data[Region East] ), "West", SELECTEDVALUE ( Data[Region West] ), "South", SELECTEDVALUE ( Data[Region South] ), "North", SELECTEDVALUE ( Data[Regioin North] ) )Then set a filter on the visual to [Region Owner] is not empty.
I have attached my sample file for you to look at.
So fast, you are awesome,
Thanks jdbuchanan71 , worked like a charm.
2 Replies
- jdbuchanan71
Super User
We can write a measure to return the Region Owner like this.
Region Owner = VAR _Region = SELECTEDVALUE ( 'Region Name'[Regions] ) RETURN SWITCH( _Region, "East", SELECTEDVALUE ( Data[Region East] ), "West", SELECTEDVALUE ( Data[Region West] ), "South", SELECTEDVALUE ( Data[Region South] ), "North", SELECTEDVALUE ( Data[Regioin North] ) )Then set a filter on the visual to [Region Owner] is not empty.
I have attached my sample file for you to look at.
- Anno2019
Helper IV
So fast, you are awesome,
Thanks jdbuchanan71 , worked like a charm.