Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
jalaomar
Helper IV
Helper 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
2 ACCEPTED SOLUTIONS
mh2587
Super User
Super 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"
)

Did I answer your question? If so, please mark my post as a solution!


Proud to be a Super User!




LinkedIn Icon
Muhammad Hasnain



View solution in original post

Anonymous
Not 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" }
)

vjunyantmsft_0-1702259951351.png

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.

View solution in original post

2 REPLIES 2
Anonymous
Not 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" }
)

vjunyantmsft_0-1702259951351.png

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.

mh2587
Super User
Super 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"
)

Did I answer your question? If so, please mark my post as a solution!


Proud to be a Super User!




LinkedIn Icon
Muhammad Hasnain



Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors