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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
syaifulefendi
Frequent Visitor

ASK HELP ( Getting remark from Lateness and ontime based on multiple logic )

Hi All

Im looking for help here as i show my table below on Dax formulas

ASK.png

as we can see here . i have table ( A-D ) 
what i expect is ( E) 
based on logic on ( G) 

column F as my note only 

 

Thanks in advance
SE

1 ACCEPTED SOLUTION

you can change the field labels to your own requirements but if you look at the fields i created in the file (please reference the file you can see the logic for each field i created)  

after 9 shift is a shift thats starts after or on 9 

if(HOUR(ShiftTimes[SHIFT START]) >= 9, 1,0)
 
please explain the definition of max presence.




If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




View solution in original post

6 REPLIES 6
vanessafvg
Super User
Super User

can you supply the data in text format rather than a screeenshot?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




SHIFT STARTSHIFT ENDACTUAL STARTACTUAL END
15/10/2022 08:3015/10/2022 16:3015/10/2022 08:2015/10/2022 16:20
15/10/2022 08:0015/10/2022 16:0015/10/2022 08:2015/10/2022 16:20
15/10/2022 09:0015/10/2022 17:0015/10/2022 09:2015/10/2022 17:10
15/10/2022 10:0015/10/2022 18:0015/10/2022 10:0115/10/2022 18:00
15/10/2022 15:0015/10/2022 23:0015/10/2022 15:0615/10/2022 23:06
15/10/2022 16:3016/10/2022 00:3015/10/2022 16:1016/10/2022 00:30

I think this does what you need.  But there might be more scenarios necessary to make sure all the rules are captured, see file attached.

 

vanessafvg_0-1665823748876.png

 

 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Hi thanks for respond ,

i have some question :
1. what is aftershift ?
2. why actual shift hours same ??
3. where is max present indicator ?

Thanks in advance
SE

you can change the field labels to your own requirements but if you look at the fields i created in the file (please reference the file you can see the logic for each field i created)  

after 9 shift is a shift thats starts after or on 9 

if(HOUR(ShiftTimes[SHIFT START]) >= 9, 1,0)
 
please explain the definition of max presence.




If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Hi .. sorry 
marked solution clicked . 

Max presence is , tolerable time / flexible shift if employees start more than schedulle . as long as schedulle Not >9am . employees still remark as ontime . and for that , they must exceed when end shift equal the duration they exceeded when start shift 

 

Thanks 

SE

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors