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

Creating a measure to calculate as per logic..

Hello,

 

want to creating a measure if actual login of an emp > 48 hrs then its counts. how many emp for that supervisor as per result table..

 

Thanks in advance.....

 

EMP IDSupervisor IDDateWeekActual Login (Logn-Break)
1123426-Jun-222608:05:00
1123428-Jun-222608:01:00
1123429-Jun-222608:08:00
1123430-Jun-222608:15:00
1123401-Jul-222608:44:00
1123402-Jul-222608:05:00
2123426-Jun-222608:21:00
2123427-Jun-222608:20:00
2123428-Jun-222608:25:00
2123430-Jun-222608:06:00
2123401-Jul-222608:25:00
2123402-Jul-222608:21:00
3123427-Jun-222608:17:00
3123428-Jun-222608:10:00
3123429-Jun-222608:12:00
3123430-Jun-222608:15:00
3123401-Jul-222608:20:00

 

Result table

If time greater then 48 hrs then its counts
EMP IDSupervisor IDWK 26
112341
212341
312340
 Grand Total2

 

Creating a measure to calculate as per logic.. 

1 ACCEPTED SOLUTION

I see, in this case you can use the condition as a filter. E.g. 

COUNTROWS(
    FILTER(
SUMMARIZE('Table (7)','Table (7)'[EMP ID],'Table (7)'[Week],"hours",SUMX('Table (7)',HOUR('Table (7)'[Actual Login (Logn-Break)]))),[hours]>=48)
)

The FILTER part will return table like this:

ValtteriN_0-1658997188963.png



Then countrows couts the correct amount of rows.

 

ValtteriN_1-1658997240236.png

 









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

Proud to be a Super User!




View solution in original post

6 REPLIES 6
ValtteriN
Super User
Super User

Hi,

Try using this kind of measure:

48> = IF(SUMX('Table (7)',HOUR('Table (7)'[Actual Login (Logn-Break)]))>=48,1,0)

End result:

ValtteriN_0-1658909968731.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!

My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/







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

Proud to be a Super User!




Anonymous
Not applicable

Hi,

 

if login hours greater then >48 hrs then it's counts how many empid exceeds after 48 hrs.

hope this logic will clear to you.. 

Anonymous
Not applicable

Hi,

 

Thanks for this solutions !!

For >48 column total it is showing 1 instead of 2..

 

how can i fix this..

Anonymous
Not applicable

can you reply  @ValtteriN

 
 

I see, in this case you can use the condition as a filter. E.g. 

COUNTROWS(
    FILTER(
SUMMARIZE('Table (7)','Table (7)'[EMP ID],'Table (7)'[Week],"hours",SUMX('Table (7)',HOUR('Table (7)'[Actual Login (Logn-Break)]))),[hours]>=48)
)

The FILTER part will return table like this:

ValtteriN_0-1658997188963.png



Then countrows couts the correct amount of rows.

 

ValtteriN_1-1658997240236.png

 









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

Proud to be a Super User!




Anonymous
Not applicable

Thank you so much ..

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

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

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.