In PowerBI I have a table like this:
I created a measure to calculate the total head count for selected groups and selected age:
head count_total =
VAR
Category = FILTER(ALL('table'[group]), 'table'[group] = "apple" || "pear")
VAR
includeage = FILTER(ALL('table'[age]), table[age]>=20)
RETURN
CALCULATE(SUM('table'[head count]), Category, includeage)
I get this error message:
Cannot convert value “pear” of type Text to type TRUE/FALSE
Can anyone help diagnose where went wrong in the coding? Many thanks!