Forum Discussion
Time difference two tables
Hi all,
I am having difficulty in calculating the time difference between two tables.
I need to calculate sum of time difference from table 2 between type A and B which is 21 min. This i calulated without any issue. challange is from these 21 min i have to subtract the time difference using table 1 only for the period which falls under the different dates for type A and B from table 2. For e.g from table 1 i don't have to consider row number 1 because start and end date is out of scope between dates in table 2. From table 1, row 2 and 3 should be considered because they fall under the date between row 3 and 4 of table 2. so from 21 min of table 2 i have to subtract only 11 minutes (6 minutes of row 2 and 5 minutes from row 3) from table 1.
In the data model there is a possibility of relation between table 1 and 2.
Any idea how to achieve this?
Thanks
10 Replies
- ryan_mayuSuper User
How did you get the date difference column? did you use DAX to calcuate?
- TaroGulatiHelper III
Hi, that i calculated using the min date for A and min date B for each combination and then summed up.
- ryan_mayuSuper User
- Ashish_MathurSuper User
Hi,
Share the download link of the file. Show the expected result there.
- Ashish_MathurSuper User
Hi,
Share the download link of the file. Show the expected result there.
- TaroGulatiHelper III
- Ashish_MathurSuper User
Clearly show the end result which you are expecting.