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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
guil-laume
Frequent Visitor

How to know if at least one row contains my product

Hi everybody,

 

I have the following problem that i can't solve by myself.

 

DocumentNumberItem FamilyContains Family1 or Not
INVOICE1Family1Yes
INVOICE1Family2Yes
INVOICE2Family1Yes
INVOICE3Family2No

 

For a same document number, i have multiple lines. Each lines correspond to an item.
If my item is from the family Family1, if would like to tag in the third column "Yes" for all lines which have the same document number.

 

Could anyone help me please ? 

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @guil-laume 
Please try

Contains Family1 or Not =
IF (
    "Family1"
        IN CALCULATETABLE (
            VALUES ( TableName[Contains Family1 or Not] ),
            ALLEXCEPT ( TableName, TableName[ocumentNumber] )
        ),
    "Yes",
    "No"
)

View solution in original post

2 REPLIES 2
tamerj1
Super User
Super User

Hi @guil-laume 
Please try

Contains Family1 or Not =
IF (
    "Family1"
        IN CALCULATETABLE (
            VALUES ( TableName[Contains Family1 or Not] ),
            ALLEXCEPT ( TableName, TableName[ocumentNumber] )
        ),
    "Yes",
    "No"
)

Thanks @tamerj1 ,

 

It works !

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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