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
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"
)