Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

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        ...
  • Anonymous's avatar
    Anonymous
    7 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.