Forum Discussion
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 his country, and another slicer where the participant can select a country he want to compare with.
Those two measures should be displayes in a column chart, which shows the participation rate of both countries in different columns. Furthermore i´d like to show the Participation rates the last few years for both of the countries.
Is that possible? My problem is that, when i filter or both countries, my column chart shows nothing. In my Table the countries are displayes as rows, and the years are shown as columns.
Would be grea
6 Replies
- ChakravarthyResolver II
Anonymous , You need to duplicate country table. One of them need to be a disconnected table. You can refer the below video which wil help.
- AnonymousNot applicable
Thank you for your advice. But that doesn´t solve my problem. My Chart still doesn´t show two columns, one for each Slicer.
- AhmedxSuper User
Share sample pbix file to help you.
- PaulDBrownCommunity Champion
Sounds like you need to unpivot the year columns and set the countries on the x axis. You should only need one slicer for coutnry
- CoreyPSolution 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.
- AnonymousNot 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.