Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have a report with 1 bar chart and 1 measure.
However I have 10 dimensions I want to plot the measure on.
Instead of creating 10 charts, all with a different dimension, I would like to introduce a slicer that let's the user select one of the possible 10 dimensions (fields in my table).
Then the chart should show the measure plotted on the selected dimension in the slicer.
I have just 1 Table with the following fields:
How to make a filter where the user selects one of the values (other than total number) and then get the chart plotted for the selected value.
Thanks for the hints and help
Solved! Go to Solution.
Hi @Anonymous ,
You should try to use the measure instead of the calculated column.
My variabele col =
VAR Selection =
SELECTEDVALUE ( 'Ref table'[Variable] )
RETURN
SWITCH (
Selection,
"Age", MAX ( 'Maintable'[Age] ),
"Household size", MAX ( 'Maintable'[Householdsize] ),
"Income group", MAX ( 'Maintable'[Income] )
)
You can check more details from here.
Reference: Calculated columns and measures in DAX
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
You should try to use the measure instead of the calculated column.
My variabele col =
VAR Selection =
SELECTEDVALUE ( 'Ref table'[Variable] )
RETURN
SWITCH (
Selection,
"Age", MAX ( 'Maintable'[Age] ),
"Household size", MAX ( 'Maintable'[Householdsize] ),
"Income group", MAX ( 'Maintable'[Income] )
)
You can check more details from here.
Reference: Calculated columns and measures in DAX
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous
One alternative it to use buttons and bookmarks.
So on the same page you can add 10 buttons. Each button will be linked to a separate dimension.
In the same page you will have the same graph 10x times but on the click of every button only one will be displayed and the other 9 will be hidden.
Bookmarks will do this for you. You will create 10 bookmarks and for each boomark you can specify which objects will be visible and which ones will be hidden.
thanks themistoklis,
I have tried to do something with a calculated column and a small ref table (via Enter data).
The ref table with just 1 column with values that reflect the dimensions. This one I used for the slicer.
Then I created a calculated column that I put as the dimension of the chart. The calculated column goes like this:
IF the selected value of the new ref column =
My variabele col =
VAR Selection =
SELECTEDVALUE ( 'Ref table'[Variable] )
RETURN
SWITCH (
TRUE (),
Selection = "Age", Maintable[Age],
Selection = "Household size", Maintable[Householdsize],
Selection = "Income group", Maintable[Income]
)
Somehow this doesn't work....
Who can help me fix this or look in the right direction?
Thanks!
J
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
99 | |
80 | |
70 | |
59 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |