Forum Discussion
Anonymous
2 years agoNot applicable
Slicer affecting column chart
Hello, i am currently struggeling with a dashboard, which displays the participation rate filtered by country for the stock compensation. I want to have a slicer where the participant can select h...
CoreyP
2 years agoSolution Sage
I think I understand what you're after. Does this get you closer?
I used this for sample data:
Disconnected table for measure as axis:
Model:
DAX measure:
AVG P Rate =
VAR _usercountry = SELECTEDVALUE( 'dim Countries'[Country Code] )
VAR _comparecountry = SELECTEDVALUE( 'dim Compare Countries'[Country Code] )
VAR _selected = SELECTEDVALUE( _measure[Measure Selection] )
VAR _log = SWITCH( TRUE() , _selected = "User Country AVG" , AVERAGEX( FILTER( 'fact ParticipationRates' , 'fact ParticipationRates'[Country] = _usercountry ) , 'fact ParticipationRates'[Participation Rate] ) , _selected = "Compare Country AVG" , AVERAGEX( FILTER( 'fact ParticipationRates' , 'fact ParticipationRates'[Country] = _comparecountry ) , 'fact ParticipationRates'[Participation Rate] ) , BLANK() )
RETURN
_logOutput:
I kept it pretty basic to illustrate what I thought you wanted to accomplish. If so, you should be able to easily edit to suit your specific requirements.
- Anonymous2 years agoNot applicable
I am really thankfulfor your help.
Because i am a real beginner, i am not sure about the disconnected Table. I just created a new table with those the Usercountryand the ComparisonCountry, but how do i get the values in there.
My data looks a like the following example.
And the countries can be choosen by the Users in two different slicers.