Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Check if the combination occurs within a table

I have a table. I want to create a column for evaluating if the combination occurs within a table.

 

See the example below:

NameCategoryOk/NotOk
APDEOK
AKDEOK
BPDEOK
BPDEOK
BKDEOK
CKDENotOK
CKDENotOK
DKDENotOK
DKDENotOK
DKDENotOK

 

In the example above, I have a name and Category columns. If the Category column ="PDE", "Ok/NotOk" = "OK" for all the rows across the Name column.

  • Hi Anonymous 

    Try this, create the column,

    Ok/NotOk = 
    var _count=CALCULATE(COUNTROWS('Table'),FILTER(ALLEXCEPT('Table','Table'[Name]),'Table'[Category] = "PDE"))
    return IF(_count>0,"OK","NotOK")

    result

     

    Best Regards,

    Community Support Team _Tang

    If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

2 Replies