Forum Discussion
Anonymous
7 years agoNot applicable
Including or excluding rows
What is the best method for including/excluding rows that contain a certain value, filter or slicer? And how would that look? Here is some sample data. TASKTABLE Task Resource ...
- Anonymous7 years ago
Anonymous - Sorry, should be SUM(TASKTABLE[Hours]), so the measure should be:
Hours Measure = var _inclusive = IF( HASONEVALUE(Parameters[Include Admin]), IF( VALUES(Parameters[Include Admin]) = "Yes", "Inclusive", "Exclusive" ), "Inclusive" ) return CALCULATE( SUM(TASKTABLE[Hours]), FILTER( 'TASKTABLE', OR( _inclusive = "Inclusive", [Task] <> "Admin" ) ) )And then use this measure in the visual filter.
Anonymous
7 years agoNot applicable
Thanks for the explanation and examples, I'm a lot further than I was. :-)
It's not working, but I don't understand the "CALCULATE(SUM(Parameter[One]),". I changed it to:
CALCULATE(DISTINCT(Parameter[Include Admin]),, but I'm not sure what to put in the visual filter.
Thanks,
David
Anonymous
7 years agoNot applicable
Anonymous - Sorry, should be SUM(TASKTABLE[Hours]), so the measure should be:
Hours Measure =
var _inclusive = IF(
HASONEVALUE(Parameters[Include Admin]),
IF(
VALUES(Parameters[Include Admin]) = "Yes",
"Inclusive",
"Exclusive"
),
"Inclusive"
)
return
CALCULATE(
SUM(TASKTABLE[Hours]),
FILTER(
'TASKTABLE',
OR(
_inclusive = "Inclusive",
[Task] <> "Admin"
)
)
)
And then use this measure in the visual filter.