Forum Discussion
jalaomar
2 years agoHelper IV
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 conext within the measure itself based on the following criteria
Organisation = is not blank
WorkType = "Installation" & "Absence"
anyway to add this filter context within the measure?
BR
J
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" )- Anonymous2 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.
2 Replies
- mh2587Super User
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" ) - AnonymousNot applicable
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.