cancel
Showing results for
Did you mean:
New Member

## Multilevel Slicers for unrelated attributes, to return the value of the last selected attribute HELP

Dear Community,

A bit of a clusterf*ck on this one... I have a bunch of indicators that I'd like to organize in filters:

Basically, if you click on A you have the choice to further click on C and D. Those 3 indicators are unrelated and the value should not be aggregated. It is merely a way to organize the attributes

I'd like the value displayed to be the one of the last attribute chosen:

* I select A only= 1 (value of A)

* I select A then C = 3 (value of C)

Quite the puzzle hey! Anyone has any ideas? I can get the filters to work, the value to work, but not together!

Any idea is more than welcome!

Delphine.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support Team

## Re: Multilevel Slicers for unrelated attributes, to return the value of the last selected attribute

After my research, You may try to this way as below:

Step1:

In Edit Queries, Duplicate the indicator table (optional), then select the all the level then unpivot the columns.

Note: It is better the level columns have the size of the hierarchy, otherwise, you need a level column hierarchy reference table.

Then create a relationship between it with the indicator table to determine the minimum level.

Step2:

Create the relationship between unpivot table with data table

Step3:

Step4:

Create a measure like below:

`Measure = IF(ISFILTERED('Table1 (2)'[Value]), IF(CALCULATE(MAX('Table1 (2)'[Attribute]),ALL(Table2))=CALCULATE(MAX('Table1 (2)'[Attribute])),1,2),3)`

Step5:

Create the visual

Darg the field Attribute and Value from Unpivot table into Hierarchy slicer

And drag the field Value from data table into table visual then drag the measure into visual level filter of table visual and set

filter is 1 or 3

Result:

Select ASelect A and C

here is pbix, please try it.

https://www.dropbox.com/s/qhf5vyifbau3rfj/Multilevel%20Slicers%20for%20unrelated%20attributes%2C%20t...

Best Regards,
Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Community Support Team

## Re: Multilevel Slicers for unrelated attributes, to return the value of the last selected attribute

After my research, You may try to this way as below:

Step1:

In Edit Queries, Duplicate the indicator table (optional), then select the all the level then unpivot the columns.

Note: It is better the level columns have the size of the hierarchy, otherwise, you need a level column hierarchy reference table.

Then create a relationship between it with the indicator table to determine the minimum level.

Step2:

Create the relationship between unpivot table with data table

Step3:

Step4:

Create a measure like below:

`Measure = IF(ISFILTERED('Table1 (2)'[Value]), IF(CALCULATE(MAX('Table1 (2)'[Attribute]),ALL(Table2))=CALCULATE(MAX('Table1 (2)'[Attribute])),1,2),3)`

Step5:

Create the visual

Darg the field Attribute and Value from Unpivot table into Hierarchy slicer

And drag the field Value from data table into table visual then drag the measure into visual level filter of table visual and set

filter is 1 or 3

Result:

Select ASelect A and C

here is pbix, please try it.

https://www.dropbox.com/s/qhf5vyifbau3rfj/Multilevel%20Slicers%20for%20unrelated%20attributes%2C%20t...

Best Regards,
Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Announcements

#### Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

#### Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

#### January 2020 Community Highlights

Make sure you didn't miss any of the things that happened in the community in January!

Top Solution Authors
Top Kudoed Authors