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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
NavaneethaRaju
Helper IV
Helper IV

Facing issue with Filtering Data and Measure

Hi, 

I have enclosed sample data from my model.
My requirment:

I have a Tag ID, Tag_Owner, Order_Owner, Procedures these four fields.

Task 1. Tag ID Number - 1065,  Order Owner is done the more procedures, So i want only to show that Tag ID Used and Shared Procedures in My table.
Task 2. I want to restrict the Tag Id Where the Order Owner procedure is less than a Tag Owner(Tag ID 1221). 

I enclosed the Total Procedures and %of Usage Measure. 

Total Procedures =
SUMX (
    VALUES ( 'Tag Usage Fact'[Tag ID] ),
    CALCULATE (
        SUM ( 'Procedure Fact'[Procedures] ),
        ALLEXCEPT (
            'Tag Usage Fact',
            'Tag Usage Fact'[Tag ID]
        ),
        FILTERS ( 'Tag Usage Fact'[Order Date] ),FILTERS('Tag Usage Fact'[Tag Owner Name])
    )
)



% of Usage = SUM('Procedure Fact'[Procedures])/[Total Procedures]



Tag IDSet IDSet NameSystem NameTag Owner NameOrder Owner NameProceduresTotal Procedures% of UsageUsage Type

1065926.9Posterior Auxiliary Instruments SetPosterior Disc Prep InstrumentsAT MEDAT MED1333%Used
1065926.9Posterior Auxiliary Instruments SetPosterior Disc Prep InstrumentsAT MEDPP/AD2367%Shared
1221924.902REVERE Instrument IREVERE 5.5 Degen Ti SystemJean PJean P444696%Used
1221924.902REVERE Instrument IREVERE 5.5 Degen Ti SystemJean PTravis2464%Shared



Please advice how to show details in table as per Task 1.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @NavaneethaRaju ,

You can follow the below steps to get it:

1. Create a measure as below to judge if the current Tag ID fulfill the conditions

Flag = 
VAR _seltagid =
    SELECTEDVALUE ( 'Tag Usage Fact'[Tag ID] )
VAR _pusageorder =
    SUMX (
        FILTER (
            'Tag Usage Fact',
            'Tag Usage Fact'[Tag ID] = _seltagid
                && 'Tag Usage Fact'[Tag Owner Name] = 'Tag Usage Fact'[Order Owner Name]
                && 'Tag Usage Fact'[Usage Type] IN { "Used", "Shared" }
        ),
        [% of Usage]
    )
VAR _pusagetag =
    SUMX (
        FILTER (
            'Tag Usage Fact',
            'Tag Usage Fact'[Tag ID] = _seltagid
                && 'Tag Usage Fact'[Tag Owner Name] <> 'Tag Usage Fact'[Order Owner Name]
                && 'Tag Usage Fact'[Usage Type] IN {  "Used", "Shared" }
        ),
        [% of Usage]
    )
RETURN
    IF ( _pusageorder <> _pusagetag, 1, 0 )

2. Create a visual and apply a visual-level filter on the visual with the condition (Flag is 1)

yingyinr_0-1660635769811.png

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @NavaneethaRaju ,

You can follow the below steps to get it:

1. Create a measure as below to judge if the current Tag ID fulfill the conditions

Flag = 
VAR _seltagid =
    SELECTEDVALUE ( 'Tag Usage Fact'[Tag ID] )
VAR _pusageorder =
    SUMX (
        FILTER (
            'Tag Usage Fact',
            'Tag Usage Fact'[Tag ID] = _seltagid
                && 'Tag Usage Fact'[Tag Owner Name] = 'Tag Usage Fact'[Order Owner Name]
                && 'Tag Usage Fact'[Usage Type] IN { "Used", "Shared" }
        ),
        [% of Usage]
    )
VAR _pusagetag =
    SUMX (
        FILTER (
            'Tag Usage Fact',
            'Tag Usage Fact'[Tag ID] = _seltagid
                && 'Tag Usage Fact'[Tag Owner Name] <> 'Tag Usage Fact'[Order Owner Name]
                && 'Tag Usage Fact'[Usage Type] IN {  "Used", "Shared" }
        ),
        [% of Usage]
    )
RETURN
    IF ( _pusageorder <> _pusagetag, 1, 0 )

2. Create a visual and apply a visual-level filter on the visual with the condition (Flag is 1)

yingyinr_0-1660635769811.png

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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