Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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
Hi,
Share the download link of the file. Show the expected result there.
Clearly show the end result which you are expecting.
Hi,
Share the download link of the file. Show the expected result there.
How did you get the date difference column? did you use DAX to calcuate?
Proud to be a Super User!
Hi, that i calculated using the min date for A and min date B for each combination and then summed up.
pls see if this is what you want
Proud to be a Super User!
Hi, thanks for the feedback. in this case result should be 11 not 10. Agree?
totally 21 mins, then substract 6 mins from row 2 and 5 mins from row 3.
21-6-5=10.
if I misunderstood the calculation logic, pls correct me.
Proud to be a Super User!
Hi, yes you are correct.
Thanks
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 38 | |
| 36 | |
| 31 | |
| 28 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |