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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
MC777
New Member

At least one value marks all values

I need help.

 

I currently have this kind of data (green cells). I would need to add a new column that would contain the value "yes" if there is at least one "yes" for a given order.

 

I hope you understand me.

 

MC777_0-1679054983456.png

 

 

How can I do that?

 

MC

1 ACCEPTED SOLUTION
Ahmedx
Super User
Super User

try to write like this

Column = 
VAR _order = 'Table'[order]
VAR _RESULT =
    CALCULATE (
        COUNTROWS (),
        FILTER (ALL ( 'Table' ),
                'Table'[order] = _order
                && 'Table'[something] = "yes")
    )
RETURN
    IF ( _RESULT = 1, "YES", "NO" )


Screen Capture #640.png

View solution in original post

1 REPLY 1
Ahmedx
Super User
Super User

try to write like this

Column = 
VAR _order = 'Table'[order]
VAR _RESULT =
    CALCULATE (
        COUNTROWS (),
        FILTER (ALL ( 'Table' ),
                'Table'[order] = _order
                && 'Table'[something] = "yes")
    )
RETURN
    IF ( _RESULT = 1, "YES", "NO" )


Screen Capture #640.png

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.