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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Arthurfrc
New Member

Segmentation can filter another segmentation

Is possible for one segmentation filter to have options excluded or filtered from another segmentation filter?

Example:

1º segmentation filter
[x]A - [ ]B - [ ]C
2º segmentation filter
[disable]A - [x]B - [ ]C

3º segmentation filter
[disable]A - [disable]B - [x]C

1 ACCEPTED SOLUTION

Hi @Arthurfrc ,

 

Please try:

First create tree tables for slicers:

vjianbolimsft_0-1675649459374.png

vjianbolimsft_1-1675649485984.png

Then apply measure [Flag for segmentation2] to segmentation2, [Flag for segmentation3] to segmentation3:

Flag for segmentation2 =
VAR _a =
    SELECTCOLUMNS ( 'Table', "1", [segmentation] )
RETURN
    IF (
        ISFILTERED ( 'Table'[segmentation] )
            && MAX ( 'Table 2'[segmentation] ) IN _a,
        0,
        1
    )


Flag for segmentation3 =
VAR _a =
    SELECTCOLUMNS ( 'Table', "1", [segmentation] )
VAR _b =
    SELECTCOLUMNS ( 'Table 2', "2", [segmentation] )
RETURN
    SWITCH (
        TRUE (),
        ISFILTERED ( 'Table'[segmentation] ) && ISFILTERED ( 'Table 2'[segmentation] )
            && MAX ( 'Table 3'[segmentation] ) IN UNION ( _a, _b ), 0,
        ISFILTERED ( 'Table'[segmentation] )
            && NOT ( ISFILTERED ( 'Table 2'[segmentation] ) )
                && MAX ( 'Table 3'[segmentation] ) IN _a, 0,
        NOT ( ISFILTERED ( 'Table'[segmentation] ) )
            && ISFILTERED ( 'Table 2'[segmentation] )
            && MAX ( 'Table 3'[segmentation] ) IN _b, 0,
        1
    )

vjianbolimsft_4-1675649671423.png

 

vjianbolimsft_3-1675649654585.png

Final output:

vjianbolimsft_5-1675649705018.png

vjianbolimsft_6-1675649716378.png

Best Regards,

Jianbo Li

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

5 REPLIES 5
v-jianboli-msft
Community Support
Community Support

Hi @Arthurfrc ,

 

This cannot be achieved using just one table, because when you use only one table, the three slicers you create cannot be selected independently without being affected.

 

Best Regards,

Jianbo Li

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

Arthurfrc
New Member

I wanna try something with my noob drawing in paint.

'A, B and C' are options in my segmentation 1,
each time I choose one of them , in next segmentations (2 & 3)
this option need to disappear.

 

Test.png

Now this did any sense?😅

Hi @Arthurfrc ,

 

Please try:

First create tree tables for slicers:

vjianbolimsft_0-1675649459374.png

vjianbolimsft_1-1675649485984.png

Then apply measure [Flag for segmentation2] to segmentation2, [Flag for segmentation3] to segmentation3:

Flag for segmentation2 =
VAR _a =
    SELECTCOLUMNS ( 'Table', "1", [segmentation] )
RETURN
    IF (
        ISFILTERED ( 'Table'[segmentation] )
            && MAX ( 'Table 2'[segmentation] ) IN _a,
        0,
        1
    )


Flag for segmentation3 =
VAR _a =
    SELECTCOLUMNS ( 'Table', "1", [segmentation] )
VAR _b =
    SELECTCOLUMNS ( 'Table 2', "2", [segmentation] )
RETURN
    SWITCH (
        TRUE (),
        ISFILTERED ( 'Table'[segmentation] ) && ISFILTERED ( 'Table 2'[segmentation] )
            && MAX ( 'Table 3'[segmentation] ) IN UNION ( _a, _b ), 0,
        ISFILTERED ( 'Table'[segmentation] )
            && NOT ( ISFILTERED ( 'Table 2'[segmentation] ) )
                && MAX ( 'Table 3'[segmentation] ) IN _a, 0,
        NOT ( ISFILTERED ( 'Table'[segmentation] ) )
            && ISFILTERED ( 'Table 2'[segmentation] )
            && MAX ( 'Table 3'[segmentation] ) IN _b, 0,
        1
    )

vjianbolimsft_4-1675649671423.png

 

vjianbolimsft_3-1675649654585.png

Final output:

vjianbolimsft_5-1675649705018.png

vjianbolimsft_6-1675649716378.png

Best Regards,

Jianbo Li

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

Great, thanks, it is what I was searching to my BI.

Just for curiosity... does this work with just one table or do I really need to copy the table to as many different options as I need??

v-jianboli-msft
Community Support
Community Support

Hi @Arthurfrc ,

 

Sorry for that the information you have provided is not making the problem clear to me. Can you please share more details to help us clarify your scenario?

Please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

 

Refer to:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

 

Best Regards,

Jianbo Li

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

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.