I would like to create a KPI to count the cases of the previous month do a dropdown but I keep getting a message that "The aggregation function MAX cannot be used together with a dimension function input. Please check that there are no aggregations and dimensions used together as function inputs.” .Have you got idea how to do it?
MY pql:
COUNT( DISTINCT CASE WHEN ROUND_MONTH("EKKO"."AEDAT") = MAX(ROUND_MONTH("EKKO"."AEDAT"))
THEN "EKKO"."MANDT"
END
)