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.
Hi all,
I have a dataset, below is the one drive link of the sample datset for better understanding. It has a single date-time column. I need to write a measure that gives me the sum of difference of hours based on Code & labels. The column called "Code" is basically a parent column & has different levels which are located in "Level" column.
Need to write a measure that can give me the total time spent on each distinct code in "Code" column and also gives the bifurcation of time spent in hours on various corresponding levels in "Level" Column for the same code.
https://1drv.ms/x/s!At-ypUY12rplbGvt_fEwRTS64Ig
Code | Time Spent | Code | level | Time Spent | |
Mech021 | 1000 | Mech021 | 1 | 200 | |
Mech021 | 3 | 150 | |||
Mech021 | 4 | 300 | |||
Mech021 | 5 | 250 | |||
Mech021 | 6 | 100 | |||
@hemantsingh thanks for the sharing the dataset but it is not very clear that how you want time spent to be calculated? Could you please explain with an example?
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Hi @parry2k
Time spent should get calculated in "Hours". All in all i need to show the the "total time spent" in Hours for each "Code". Further, if i bring in Level column than the time spent for each code should get bifurcated in the subsequent portions of time spent in each level that constitutes the Code.
I hope its clear. Leme know if you want futher more clarification or more detailed example.
Regards,
Hemant
@hemantsingh,
Could you please describe more details about the logic you use to calculate Time spent? Take the highlighted codes for example, what difference do you refer to? Code 420 have 2 levels, do you want to calculate hour difference between the two levels(7/6/2017 4:17:00 PM and 7/8/2017 5:47:11 PM) in terms of Level scope for each code?
Also in terms of Code level, what hour difference do you want to return for code 420 and code 4545?
Regards,
Lydia
YEs...you got it right. I want the time difference for each level for a code.
Regards
@hemantsingh,
In terms of Code level, what hour difference do you want to return for code 420 and code 4545? Each code has serveral levels with different datetime, which specific datetime values for code 420 and code 4545 would you like to compare?
Regards,
Lydia
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
97 | |
96 | |
81 | |
74 | |
66 |
User | Count |
---|---|
126 | |
106 | |
105 | |
86 | |
72 |