Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Anonymous
Not applicable

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

Untitled.png

 

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!

 

Many thanks for reading

 

Delphine.

 

 

1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

hi, @Anonymous

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.

1.JPG

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

2.JPG

Step3:

You could download a  Hierarchy slicer from Marketplace

3.JPG

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

4.JPG

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

5.JPG

Result:

Select ASelect ASelect A and CSelect A and C

here is pbix, please try it.

https://www.dropbox.com/s/qhf5vyifbau3rfj/Multilevel%20Slicers%20for%20unrelated%20attributes%2C%20to%20return%20the%20value%20of%20the%20last%20selected%20attribute%20HELP.pbix?dl=0

 

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.

View solution in original post

1 REPLY 1
v-lili6-msft
Community Support
Community Support

hi, @Anonymous

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.

1.JPG

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

2.JPG

Step3:

You could download a  Hierarchy slicer from Marketplace

3.JPG

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

4.JPG

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

5.JPG

Result:

Select ASelect ASelect A and CSelect A and C

here is pbix, please try it.

https://www.dropbox.com/s/qhf5vyifbau3rfj/Multilevel%20Slicers%20for%20unrelated%20attributes%2C%20to%20return%20the%20value%20of%20the%20last%20selected%20attribute%20HELP.pbix?dl=0

 

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.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.