Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Good morning,
I have a table with a calendar, a column with the dates and a column with the number 1 for the days the company is open and 0 for the days the company is closed.
I have another table with a column with the start of production date and another with the end.
I need to datediff, filtering only the days the company is open, =1.I can't understand how this dont work:
Time Spent = CALCULATETABLE(datediff('Production'[Startdate],'Production'[Date Time],HOUR),FILTER(DateCalendar,DateCalendar[Workday]=1))
Solved! Go to Solution.
@Joao_C_Faria , id start date and end date are column in same table :Production, you can create a column in Production
new column = countx(filter(DateCalendar, DateCalendar[Date] >= Production[Start Date] && DateCalendar[Date] <= Production[End Date] && DateCalendar[Workday]=1),DateCalendar[Date])
else you have to take a measure approch
How to calculate Business Days/ Workdays, with or without date table: https://youtu.be/Qv4wT8_P-AA
The number 1 in the calendar table represents the company being open, and it's in text format, I tried to do "1", but it didn't work either.
First of all, thank you for availability.
Says the expression references multiple columns. It is not possible to transform several columns into a scalar value.
I send the images as an attachment to make it easier, I changed the name of the columns that were in Portuguese to make it more readable.
ComplimentsI need to know the number of business days between startdate and enddate.
Thank you very much.@Joao_C_Faria , id start date and end date are column in same table :Production, you can create a column in Production
new column = countx(filter(DateCalendar, DateCalendar[Date] >= Production[Start Date] && DateCalendar[Date] <= Production[End Date] && DateCalendar[Workday]=1),DateCalendar[Date])
else you have to take a measure approch
How to calculate Business Days/ Workdays, with or without date table: https://youtu.be/Qv4wT8_P-AA
@Joao_C_Faria , create a new column in production
new column = countx(filter(DateCalendar, DateCalendar[Date] >= Production[Start Date] && DateCalendar[Date] <= Production[End Date] && DateCalendar[Workday]=1),DateCalendar[Date])
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 45 | |
| 41 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 64 | |
| 32 | |
| 31 | |
| 27 |