Forum Discussion
Filtered Value
Hi there!
I am looking for assistance with creating a dax. What I am trying to accomplish is allow users to toggle on and off data within a line/column chart. I have created a table of the measures that i would like them to ultimately select the values to be shown within the illustration (Budget, forecast, sales, etc.). I found a dax that calculates the value based on the selection. However, I am running into an issue as to when multiple values are selected.
To keep it simple the following formula works great.
I was able to solve this by adding a table for the values I wanted to be selected within the ullustration. Then i used the following dax based on the selection.
Visible Budget Revenue = var logicTest= countrows(distinct(filter(allselected(_VisibleMeasures[Visible Measures]),_VisibleMeasures[Visible Measures]="Budget Revenue")))=1 return if(LogicTest,[Budget Revenue],blank())The dax was replicated for each of the measures that a user could select in the illustration. The only downside is that all possible possible measures will show even if not selected. I guess the upside to this illustrates what can be included with visualization
1 Reply
- jawilson808Helper I
I was able to solve this by adding a table for the values I wanted to be selected within the ullustration. Then i used the following dax based on the selection.
Visible Budget Revenue = var logicTest= countrows(distinct(filter(allselected(_VisibleMeasures[Visible Measures]),_VisibleMeasures[Visible Measures]="Budget Revenue")))=1 return if(LogicTest,[Budget Revenue],blank())The dax was replicated for each of the measures that a user could select in the illustration. The only downside is that all possible possible measures will show even if not selected. I guess the upside to this illustrates what can be included with visualization