Forum Discussion
o59393
Post Prodigy
2 years agoCount if with a measure
Hi Is it possible to create a count if with a measure? In the image below I have a capacity planning process with different activities (drilled down). The rule is simple, i...
ITManuel
Responsive Resident
2 years agoWhat you are doing is not counting anything, but calculating your [ Count IF] measure for each line and its specific filter context in the visual.
Try this:
COUNT IF =
VAR _T1 =
FILTER (
ADDCOLUMNS (
VALUES ( Template[Facet] ),
"@%",
VAR _X =
SUMX (
SUMMARIZE ( Template, Template[Merged], Template[Hours by Year] ),
Template[Hours by Year]
)
VAR _Y =
CALCULATE (
[Non Duplicate Hours Process/Activity Numerator],
ALLEXCEPT ( Template, Template[Function], Template[Area], Template[Name] )
)
VAR _Z =
DIVIDE ( _X, _Y )
RETURN
_Z
),
[@%] >= 0.01
)
VAR _Result =
COUNTROWS ( _T1 )
RETURN
_Result