cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Fieldnames in slicer for 1 chart

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:

  • Total number
  • Age
  • Household size
  • Income group
  • Other dimension xyz

 

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

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Microsoft
Microsoft

Hi @Analyst_J ,

 

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] )

    )

result1091129.gif

 

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.

View solution in original post

3 REPLIES 3
Highlighted
Resident Rockstar
Resident Rockstar

@Analyst_J 

 

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.

Highlighted

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

Highlighted
Microsoft
Microsoft

Hi @Analyst_J ,

 

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] )

    )

result1091129.gif

 

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.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Community Conference

Microsoft Power Platform Communities

Check out the Winners!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors