The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi @Neha_Shukla ,
I added a few rows of date and Emp columns to your original table.
1.Merge Complete Date and ActivityTime columns, Modify the date type to Datetime. Then sort directly.
DateTime =
CONVERT ( 'Table'[Complete Date] & " " & 'Table'[ActivityTime], DATETIME )
2.Create a measure and group by max and min. Change the format.
Total working hours =
VAR _min =
CALCULATE (
MIN ( 'Table'[DateTime] ),
FILTER ( ALL ( 'Table' ), 'Table'[Emp] = MAX ( 'Table'[Emp] ) )
)
VAR _max =
CALCULATE (
MAX ( 'Table'[DateTime] ),
FILTER ( ALL ( 'Table' ), 'Table'[Emp] = MAX ( 'Table'[Emp] ) )
)
RETURN
_max - _min
Best Regards,
Jinwei Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Neha_Shukla , You have two value which is getting the same sort of order that is not allowed
Something like this
Column | Sort |
A | 1 |
B | 1 |
C | 2 |
That is not allowed
How to Create Sort Column and Solve Related Errors:
https://www.youtube.com/watch?v=KK1zu4MBb-c
1. I want to sort out activity time column as per latest time entry.
On activity type column there are values containing ( check - in , lunch - time, lunch- over, break- time, end- break , check-out)
2. AS per this activity which are done by employee I want to find out total working hours.
how to solve this.please help me out in this.
thanks in advance.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
122 | |
89 | |
75 | |
55 | |
45 |
User | Count |
---|---|
134 | |
120 | |
76 | |
65 | |
64 |