Forum Discussion

jalaomar's avatar
jalaomar
Helper IV
2 years ago
Solved

Filter within a measure

Hi,   Trying to add filter in measure I am using  Current Measure:  Scheduled vs Actual Effort = DIVIDE(SUM(PVEffort[ActualEffort]); SUM(TimePlanned[PlannedEffort]))   And the add filter conex...
  • mh2587's avatar
    2 years ago
    Scheduled vs Actual Effort with Filters = //try this one
    CALCULATE(
    DIVIDE(
    SUM(PVEffort[ActualEffort]),
    SUM(TimePlanned[PlannedEffort])
    ),
    NOT(ISBLANK('TableName'[Organisation])),
    'TableName'[WorkType] = "Installation" || 'TableName'[WorkType] = "Absence"
    )
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi jalaomar ,

    mh2587 Good answer! And you can also try this:

    Measure = 
    CALCULATE(
        DIVIDE(
            SUM(PVEffort[ActualEffort]),
            SUM(TimePlanned[PlannedEffort])
        ),
        'PVEffort'[Organisation] <> BLANK(),
        'PVEffort'[WorkType] IN { "Installation", "Absence" }
    )

    I've tested both DAXs and they're both correct.

    Best Regards,
    Dino Tao
    If this post helps, then please consider Accept it as the solution to both of the answers to help the other members find it more quickly.