Forum Discussion
Anonymous
6 years agoNot applicable
COUNTIF with multiple criteria
Hi - I have a single data table with the following fields for the : ACCOUNT_NAME PRODUCT_NAME STATUS DATE_GENERATED And the measure I want to generate has the following logic: for the most...
camargos88
6 years agoCommunity Champion
Anonymous ,
I would try like:
Measure =
VAR _lastDate = CALCULATED(MAX(DATE_GENERATED); ALL(Table))
RETURN
CALCULATE(COUNT(Table[ACCOUNT_NAME]),
FILTER(Table,
YEAR(DATE_GENERATED) = YEAR(_lastDate) &&
MONTH(DATE_GENERATED) = MONTH(_lastDate) &&
(
(PRODUCT_NAME = "Bus" && STATUS = "First") ||
(PRODUCT_NAME = "Car" && STATUS = "Second")
)
)
Did I answer your question? Mark my post as a solution!
Ricardo