Power BI - Custom calendar (Counting active days)

21 Views Asked by At

I have a problem that I cannot find solution to anywhere.

I have a company Calendar (table Workdays) - shows active workdays for the company. And data table (Material) which refers should be showing how long the material is delayed in hours and days. But with Duration functions I can only go so far. Are there any functions that would select start date - column [Ssed] with column [Date.Time.Now] and count duration between these dates using my calendar?

Workdays
Data
29.02.2024
01.03.2024
04.03.2024
05.03.2024
06.03.2024
07.03.2024
11.03.2024
12.03.2024
13.03.2024
14.03.2024
18.03.2024
19.03.2024
20.03.2024
21.03.2024
22.03.2024
25.03.2024
26.03.2024
27.03.2024
28.03.2024

Material Ssed
29.03.2024 14:23
11.03.2024 11:52
13.03.2024 11:38
13.03.2024 11:38
13.03.2024 11:39
13.03.2024 11:39
14.03.2024 10:32
14.03.2024 13:14
14.03.2024 16:37
14.03.2024 16:37
14.03.2024 19:51

Date.Time. Now
15.03.2024 11:08:13
15.03.2024 11:08:13
15.03.2024 11:08:13
15.03.2024 11:08:13
15.03.2024 11:08:13
15.03.2024 11:08:13
15.03.2024 11:08:13
15.03.2024 11:08:13
15.03.2024 11:08:13
15.03.2024 11:08:13
15.03.2024 11:08:13

Delay.Days
-14
3
1
1
1
1
1
0
0
0
0

Delay Hours
-339
95
47
47
47
47
25
22
19
19
15

I can manage to filter it through visuals in PBI or with functions in Excel but I would need it within the same table so the delay can be displayed with exact data it's connected to without anyone manually checking it. It would be great if you could provide demo it would be really helpful.

I have created similiar model in Excel, but it does not help beyond raw data with PBI

I have also tried putting my custom calendar into the PBI as reference one but it did not allow me to change it, but that would probably solve all the issues

0

There are 0 best solutions below