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 September 15. Request your voucher.

Reply
Irek
Helper II
Helper II

Custom Column that show if condition was met.

Have such table with ID and Yes/No columns, need to add extra column wich will show for True for ID that have Yes against them in Yes/No column, if they have for example 3 yes but one No all should be showed as False.

 

IDYes/NoResult
1YesFalse
1YesFalse
1NoFalse
2YesTrue
2YesTrue
2YesTrue
2YesTrue

 

 

I tried to do it like that:

 

 

Result =
VAR _selectedName =
CALCULATE ( SELECTEDVALUE( table[ID]  ) )
VAR _countName =
CALCULATE ( COUNT ( table[ID] ) )
VAR _countNameFree =
CALCULATE (
    COUNT ( table[ID]),
    FILTER(ALL(table[ID]), (table[ID] = _selectedName ),
           table[Yes/No] = "Yes")
           VAR result =
           IF ( _countName = _countNameFree, TRUE (), FALSE () )
           RETURN
    result
 
 
But it shows for ID 1 True for rows with Yes and False for row with No, while I would expect False for all rows with ID 1. 
 
 
Thank you for your help. 
Marcin
2 REPLIES 2
vicky_
Super User
Super User

You can use this formula: 

Result = IF(CALCULATE(MIN('Table (2)'[Yes/No]), ALLEXCEPT('Table (2)', 'Table (2)'[ID])) = "No", FALSE(), TRUE())

Hi Vicky, Thank you for your respond. Should I replace ID with Yes/No in that part: Table (2)'[ID])) = "No"? Thank you Marcin

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.