Forum Discussion
SimDam
Helper I
3 years agoCount group by with condition
Hi, Considering the below table Order Period Item Test 100 7/1/2022 1 0 100 7/1/2022 2 0 100 7/1/2022 3 1 100 8/1/2022 1 0 100 8/1/2022 2 0 ...
FreemanZ
Super User
3 years agohi SimDam
try to write the measure like this:
TestCount =
VAR _table =
ADDCOLUMNS(
VALUES(TableName[Period]),
"Test",
CALCULATE(MAX(TableName[Test]))
)
RETURN
COUNTROWS(FILTER(_table, [Test]=1))
it worked like this:
SimDam
Helper I
3 years agoThis is already working so I will go for it.
Thanks!