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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Anonymous
Not applicable

Calculate how many times in a month the break was exceeded by an employee

Hi team,

 

I have a data with time in seconds (decimal) which is converted to time format with below DAX.  

Total Aux =
VAR TotalDuration = divide (SUM ( xxxxx[Aux2])+sum(xxxxx[Aux3])+sum(xxxxx[Aux8]),24*60*60)
VAR TotalHours = TRUNC ( 24 * TotalDuration )
VAR MinSec = FORMAT ( TotalDuration - TotalHours / 24, "nn:ss" )
RETURN TotalHours & ":" & MinSec
 
Now I have to count how many days in a month an employee has exceeded (6300 seconds) the break allocated. 
 
I have a date table in my data model as well.
 
Could you please guide me how i can achieve this. 
6 REPLIES 6
v-yalanwu-msft
Community Support
Community Support

Hi, @Anonymous ;

Is your problem solved?? If so, Would you mind accept the helpful replies as solutions? Then we are able to close the thread. More people who have the same requirement will find the solution quickly and benefit here. Thank you.

Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

v-yalanwu-msft
Community Support
Community Support

Hi, @Anonymous ;

Please try it,

New measure =
VAR _TotalDuration =
    DIVIDE (
        SUM ( itops_telecom[Aux2] ) + SUM ( itops_telecom[Aux3] )
            + SUM ( itops_telecom[Aux8] ),
        24 * 60 * 60
    )
RETURN
    COUNTX (
        SUMMARIZE (
            FILTER ( ITOps_Telecom, _TotalDuration > 6300 ),
            ITOps_Telecom[logid],
            ITOps_Telecom[row_date]
        ),
        ITOps_Telecom[logid]
    )

If not, can you share a simple example similar? It is difficult to judge the correct measure without scenarios.


Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Anonymous , You have to try a measure like

 

 

New measure =
var _TotalDuration = divide(SUM ( xxxxx[Aux2])+sum(xxxxx[Aux3])+sum(xxxxx[Aux8]),24*60*60)
return
countx(filter(summarize(table, table[employee], Table[Month Year], "_1", _TotalDuration),[_1]>6300), [Employee])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

@amitchandak Thanks Amit for replying.

 

I added the below . but its giving blank results. is there something that im doing wrong?

 

New measure =
var _TotalDuration = divide(SUM ( itops_telecom[Aux2])+sum(itops_telecom[Aux3])+sum(itops_telecom[Aux8]),24*60*60)
return
countx(filter(summarize(ITOps_Telecom,ITOps_Telecom[logid], ITOps_Telecom[row_date] , "_1", _TotalDuration),[_1]>6300), ITOps_Telecom[logid])

@Anonymous , row_date will group data at the day level, not the month, if 6300 was the expected value for month

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

@amitchandak  yes. I want to calculate how many days in a month have exceeded 6300 (per day) not 6300 per month

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.