Forum Discussion

pbihelpplz's avatar
pbihelpplz
New Member
4 years ago
Solved

How to Countif Multiple Columns in PBI?

Hi everyone,   I am new to PBI, not sure if my question is too basic. I have a data table in this structure    other field field 1 field 2 field 3 other field   name 1 null null   ...
  • tamerj1's avatar
    4 years ago

    Hi pbihelpplz 
    I assume no relationship betweem the two tables

    =
    VAR CurrentName =
        SELECTEDVALUE ( Table2[name] )
    RETURN
        COUNTROWS (
            FILTER (
                Table1,
                TableName[field 1] = CurrentName
                    || TableName[field 2] = CurrentName
                    || TableName[field 3] = CurrentName
            )
        )