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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
ManuelGeiger
Helper I
Helper I

Keep specific rows in table visual

Hey all,

 

Is there a way to keep specific rows in a table visual no matter what you filter on?
In my case I have a Bill of Material build with multiple levels which means a level 1 item could contain multiple level 2 items etc.

I would like to filter for "Repair" parts (see screenshot) which are marked with "X" but keep the bill of material structure the same and always show me level 0, 1 and 2.

ManuelGeiger_0-1686043675261.png

 

 For example in the screenshot I would filter for "X" within "Repair" (with a slicer) and the table should show me all lines for level 0, 1 and 2 as well as the two lines within level 4 (the ones with the x).

 

I this somehow possible?

1 ACCEPTED SOLUTION
ManuelGeiger
Helper I
Helper I

Hey @MFelix ,

Thanks for your answer. The data structure is just a table. Same as shown in the screenshot above

View solution in original post

3 REPLIES 3
ManuelGeiger
Helper I
Helper I

Hey @MFelix ,

Thanks for your answer. The data structure is just a table. Same as shown in the screenshot above

HI @ManuelGeiger ,

 

Add a table for the slicer:

MFelix_0-1686645321803.png

 

 

Try the following measure:

Repair Filter =
VAR temptalbe =
    FILTER (
        SUMMARIZE (
            ALL ( 'Table'[Serial number], 'Table'[Repair] ),
            'Table'[Serial number],
            'Table'[Repair]
        ),
        'Table'[Repair] = "X"
    )
VAR SerialNumber =
    DISTINCT ( SELECTCOLUMNS ( temptalbe, "SerialNumber", 'Table'[Serial number] ) )
RETURN
    SWITCH (
        SELECTEDVALUE ( 'Repair Slicer'[Repair] ),
        "Yes", IF ( SELECTEDVALUE ( 'Table'[Serial number] ) IN SerialNumber, 1 ),
        "No", IF ( NOT ( SELECTEDVALUE ( 'Table'[Serial number] ) IN SerialNumber ), 1 ),
        1
    )

Use the measure has a filter on the table and select has is not blank:

MFelix_2-1686645372083.pngMFelix_3-1686645375546.png

 

MFelix_4-1686645386028.png

 

 

MFelix_5-1686645396982.png

 


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



MFelix
Super User
Super User

Hi  @ManuelGeiger ,

 

For this you need to create a measure that allows you to make the filter accordingly, something that will add to all the level the X.

 

How is your data structured, are you using a parent child hierarchy or a flat table?


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.