Home > Enterprise >  Countifs in Power Query
Countifs in Power Query

Time:09-01

How can I write below formula in Power Query.

=countifs(A:A,A1,B:B,”In scope”)

Lets say Col A has Id numbers(can be repeated) and Col B has either Not in Scope or In Scope values only

In Scope

or if you want a brief table try this :

Modelling ---> New Table

In Scope List =
CALCULATETABLE (
    ADDCOLUMNS (
        SUMMARIZE ( YourTableName, YourTableName[ID], YourTableName[Scope] ),
        "Count", CALCULATE ( COUNT ( YourTableName[ID] ) )
    ),
    ALLEXCEPT ( YourTableName, YourTableName[ID] ),
    YourTableName[Scope] = "In Scope"
)

brief

  • Related