Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more
Hello,
I have a factable and a Mastercalendar as a dimensiontable. In the Bookingtable I want to know the processingtime of
two Dates without the weekends and the non-productive Days. With Bookingdate - IncomeDate I would only get the "WrongProcessingTime" but I need the "CorrectProcessingTime".
In the Mastertable I have all the information, but I don't know how to combine these. The "ProductiveDay" column tells me if its
a working day or not, One or Zero, also when its holiday or not.
BookingTable
| IncomeDate | BookingDate | ID | WrongProcessingTime | CorrectProcessingTime | |||||
| 2021-09-01 | 2021-09-01 | 8888 | 0 | 0 | |||||
| 2021-09-02 | 2021-09-03 | 8889 | 1 | 1 | |||||
| 2021-09-03 | 2021-09-06 | 8890 | 3 | 1 | |||||
| 2021-09-06 | 2021-09-07 | 8891 | 1 | 1 | |||||
| 2021-09-07 | 2021-09-07 | 8892 | 0 | 0 | |||||
| 2021-09-08 | 2021-09-08 | 8893 | 0 | 0 | |||||
| 2021-09-09 | 2021-09-14 | 8894 | 5 | 3 | |||||
| 2021-09-10 | 2021-09-13 | 8895 | 3 | 1 |
|
Mastercalendar:
| Date | Weekday | ProductiveDay |
| 2021-09-01 | Wednesday | 1 |
| 2021-09-02 | Thursday | 1 |
| 2021-09-03 | Friday | 1 |
| 2021-09-04 | Saturday | 0 |
| 2021-09-05 | Sunday | 0 |
| 2021-09-06 | Monday | 1 |
| 2021-09-07 | Tuesday | 1 |
| 2021-09-08 | Wednesday | 1 |
| 2021-09-09 | Thursday | 1 |
| 2021-09-10 | Friday | 1 |
| 2021-09-11 | Saturday | 0 |
| 2021-09-12 | Sunday | 0 |
I really appreciate your help.
Thank you very much in advance.
Best.
Solved! Go to Solution.
@Applicable88
Add the following column :
Processing Time =
VAR __ValidDates = FILTER( Dates, Dates[ProductiveDay] = 1 && Dates[Date] >= Table[IncomeDate] && Dates[Date] <= Table[BookingDate] )
RETURN
COUNTROWS( __ValidDates )-1
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@Applicable88
Add the following column :
Processing Time =
VAR __ValidDates = FILTER( Dates, Dates[ProductiveDay] = 1 && Dates[Date] >= Table[IncomeDate] && Dates[Date] <= Table[BookingDate] )
RETURN
COUNTROWS( __ValidDates )-1
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@Fowmy , all these rows are within 0-7 days range. But I get very high day counts with the same formula:
Hi @Fowmy, Im not exactly sure what this that function is doing. For reference I have a "CorrectProcessingTime" column displayed above, which value each "ProcessingTime" row should have. For example the row where you can see ID 8894, there is Thursday until Tuesday, which means 5 days difference, and since Saturday and Sunday are non productive it should count 3.
@Applicable88
It should work with your dates table, I copied only dates up to 9th.
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Hello @Fowmy , a big thank you!
It was my mistake I confused myself with another column. Now it works.
Have a nice day.
Best.
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!
Check out the July 2026 Power BI update to learn about new features.