cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
hemantsingh Member
Member

Difference bewteen Dates in same column in Hours based on filter criterias

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

 

CodeTime Spent CodelevelTime Spent
Mech0211000 Mech0211200
   Mech0213150
   Mech0214300
   Mech0215250
   Mech0216100
      
5 REPLIES 5
Super User
Super User

Re: Difference bewteen Dates in same column in Hours based on filter criterias

@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?





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


Proud to be a Datanaut! Connect with me on Linkedin.
Feel free to email me with any of your BI needs.




 




hemantsingh Member
Member

Re: Difference bewteen Dates in same column in Hours based on filter criterias

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

   

Moderator v-yuezhe-msft
Moderator

Re: Difference bewteen Dates in same column in Hours based on filter criterias

@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?
1.PNG

Also in terms of Code level, what hour difference do you want to return for code 420 and code 4545?

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
hemantsingh Member
Member

Re: Difference bewteen Dates in same column in Hours based on filter criterias

@v-yuezhe-msft

 

    YEs...you got it right. I want the time difference for each level for a code.

 

Regards

Moderator v-yuezhe-msft
Moderator

Re: Difference bewteen Dates in same column in Hours based on filter criterias

@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

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.