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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors