Forum Discussion
poweruser55
Helper IV
4 years agoCount at least one flag
I have an app that calculates a few KPIS using flags. It does this by using count of the flag. From there I need to add all of the counts together and divide by the total status count. There could ...
bcdobbs
Community Champion
4 years agoIf DISTINCTCOUNT is not an option and you have to control very specific sets of filters I think you'd have to go down this sort of route... (away from laptop typing on phone so apologise for any syntax issues).
CountMeasure =
VAR OliSet1 =
CALCULATETABLE (
DISTINCT ( 'Table1'[OLI Number] ),
Condition1,
Condition2
)
VAR OliSet2 =
CALCULATETABLE (
DISTINCT ( 'Table1'[OLI Number] ),
Condition1,
Condition2
)
VAR OliSet3 =
CALCULATETABLE (
DISTINCT ( 'Table1'[OLI Number] ),
Condition1,
Condition2
)
VAR CombinedSet =
DISTINCT (
UNION ( OliSet1, OliSet2, OliSet3 )
)
RETURN COUNTROWS ( CombinedSet )
poweruser55
Helper IV
4 years agoI posted expected result below just in case I wasn't clear. But maybe your solution already solves this just want to make sure. bcdobbs