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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors