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

Creating a slicer from multiple columns and making it work together with another slicer

Hi everyone,


For a couple of days I've tried creating a slicer from data in multiple columns. This kinda worked using this post as inspiration.

 

Now I have another problem... I'd love to make my new slicer dependent on another slicer: when I pick "20" in the Contracttype slicer, I'd love the "Knowledge_unique" slicer to only show possibilities associated with this particular type of contract.

 

PBI Report: 

Report.JPG

Data: 

Data.JPG

 

I feel like I've tried making this work in a thousand different ways.. My latest try was applying "Measure_knowledge" as a filter on the knowledge_unique slicer (value > 0) but that doesn't seem to work. For some reason I can't figure, some of the possibilities seem to disappear when doing this although being a positive "match".

 

I created a data set and PBI-report to simulate what I'm trying to achieve in my original report. Feel free to download both from this folder (secure folder on a server provided by Danish authorities). Access code: aJ39~g7D

 

Maybe it isn't even possible to do this? Or maybe I need to make the initial slicer from several columns in some other way for this to work... I'm really looking forward to reading your suggestions 🙂

 

Best regards,

Henrik

1 ACCEPTED SOLUTION
DataInsights
Super User
Super User

Hello,

 

Create a calculated table with unique combinations of Knowledge 1, Knowledge 2, etc., and Contract Type. This calculated table will be the data source for both slicers. Don't establish any relationships with this table.

 

SupplierSlicer = 
DISTINCT (
    UNION (
        SUMMARIZE ( Supplier, Supplier[Knowledge 1], Supplier[Contract Type] ),
        SUMMARIZE ( Supplier, Supplier[Knowledge 2], Supplier[Contract Type] )
    )
)

 

Unfiltered:

 

DataInsights_3-1595181299002.png

 

 

Filter Contract Type = 20:

 

DataInsights_4-1595181420751.png

 

Filter Contract Type = 20, and Knowledge Unique = Cooking:

 

DataInsights_5-1595181494663.png

 

Note: There's no need to display Measure_Knowledge in the table/matrix; you can add a filter to the table/matrix "Measure_Knowledge = 1".





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
DataInsights
Super User
Super User

Hello,

 

Create a calculated table with unique combinations of Knowledge 1, Knowledge 2, etc., and Contract Type. This calculated table will be the data source for both slicers. Don't establish any relationships with this table.

 

SupplierSlicer = 
DISTINCT (
    UNION (
        SUMMARIZE ( Supplier, Supplier[Knowledge 1], Supplier[Contract Type] ),
        SUMMARIZE ( Supplier, Supplier[Knowledge 2], Supplier[Contract Type] )
    )
)

 

Unfiltered:

 

DataInsights_3-1595181299002.png

 

 

Filter Contract Type = 20:

 

DataInsights_4-1595181420751.png

 

Filter Contract Type = 20, and Knowledge Unique = Cooking:

 

DataInsights_5-1595181494663.png

 

Note: There's no need to display Measure_Knowledge in the table/matrix; you can add a filter to the table/matrix "Measure_Knowledge = 1".





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Measure_Knowledge = 
IF (
    MIN ( Supplier[Knowledge 1] ) IN VALUES (SupplierSlicer[Knowledge] )
        || MIN ( Supplier[Knowledge 2] ) IN VALUES ( SupplierSlicer[Knowledge] ),
    1,
    BLANK ()
)




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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.