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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

Sum of hrs with filter condition

I want to sum StandByBeforeJobTime (hr) greater than 24
The below graph should show only values if StandByBeforeJobTime (hr) is greater than 24

ms.jpg
how to add this condition
these are the below dax which are used
StandByBeforeJobTime := DATEDIFF([ArrivedOnLocationTime],[RightUpTime],HOUR)
ArrivedOnLocationTime := Calculate( MIN(Event[event_date]),Event[event] = "Arivved on location"))
RightUpTime := Calculate( MIN(Event[event_date]),Event[event] = "Run Safety Briefing"))

 

If it was possible to create calculated column for StandByBeforeJobTime then
I would have just use Calculate(sum(StandByBeforeJobTime),StandByBeforeJobTime>24))
But I have used 2 different measures to find the hours

 

this is also not working 

measure = IF([StandByBeforeJobTime]>24,[StandByBeforeJobTime])

3 REPLIES 3
ValtteriN
Super User
Super User

Hi,

You can create a "filter measure" and apply that to your visual.
E.g. Filter measure = IF([StandByBeforeJobTime]>24,1,0)

Now place it on your visual like this:

ValtteriN_0-1642683713763.png


I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

It's not working

Hi,

Could you elaborate what the issue is? Here is a more detailed example:

Data:

ValtteriN_0-1642786601240.png


Dax:

Filter measure jobs = IF(SUM(Jobtime[Jobtime])>20,1,0)
 
End result:
ValtteriN_1-1642786695407.png

 









Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.