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
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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors