cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
Anonymous
Not applicable

exclude rows that dont have some entry

Hello. 

 

I have two tables: order lines and master data of product. I made a lookup values to know the master data of each product (weight, height, length, etc)

 

I have the following example:

 

Order_No   Product id  Master data of the product       Exclude?

808                 209           Yes                                            Yes

808                 210             No                                           Yes

808                 211             No                                            Yes

809                 209           Yes                                            No

809                 210             Yes                                          No

809                 211             Yes                                            No

 

...

 

I want to exclude all the orders that dont have at least one product without master data, like that example. For that, I want to create a calculated column (Like exclude column)  to flag these examples.

 

How can I do that?

 

Thank you!

 

 

1 ACCEPTED SOLUTION
AlB
Super User
Super User

Hi @Anonymous 

Exclude =
IF (
    "No"
        IN CALCULATETABLE (
            DISTINCT ( Table1[Master Data of Product] ),
            ALLEXCEPT ( Table1, Table1[OrderNo] )
        ),
    "Yes",
    "No"
)

 

SU18_powerbi_badge

Please accept the solution when done and consider giving a thumbs up if posts are helpful. 

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

 

View solution in original post

3 REPLIES 3
AlB
Super User
Super User

@Anonymous 

Should work. You've probably done something differently. See it in the attached file.

 

SU18_powerbi_badge

Please accept the solution when done and consider giving a thumbs up if posts are helpful. 

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

 

AlB
Super User
Super User

Hi @Anonymous 

Exclude =
IF (
    "No"
        IN CALCULATETABLE (
            DISTINCT ( Table1[Master Data of Product] ),
            ALLEXCEPT ( Table1, Table1[OrderNo] )
        ),
    "Yes",
    "No"
)

 

SU18_powerbi_badge

Please accept the solution when done and consider giving a thumbs up if posts are helpful. 

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

 

Anonymous
Not applicable

Thank you for your reply. 

 

I'm having the error that the sintax for "IN" is incorrect. Have you tried this formula?  It is the first time that i use an IN function. 

 

Thank you.

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors