Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I am a beginner in Power BI and I am trying to get the number of day from start date/end date.
Its proving a challenge as I needed it to be work days mon-fri.
Below is the DAX used for my column but its providing me with an error - The start date or end date in Calendar function can not be Blank value.
I am assuming this is because some of the rows start date or end date, may be blank. However I want to to ignore them and just give me the days for the ones with a start and end date.
I have tried putting in an IF statement but it did not seem to work as I really have no clue where to input it.
Solved! Go to Solution.
Hi,
Why not using the NETWORKDAYS function in DAX, especially if you just need to remove satudays and sundays.
If you have to deal with bank holidays then you'd better set them in a Date Table.
You can even set some bank holidays in NETWORKDAYS but it might be more easy with a date table.
So if you just need to remove saturdays and sundays, networkdays(startdate, enddate) is perfect.
If you want more details about the funtion :
https://learn.microsoft.com/en-us/dax/networkdays-dax
Let us know if it works or if you need more information
Hi,
Why not using the NETWORKDAYS function in DAX, especially if you just need to remove satudays and sundays.
If you have to deal with bank holidays then you'd better set them in a Date Table.
You can even set some bank holidays in NETWORKDAYS but it might be more easy with a date table.
So if you just need to remove saturdays and sundays, networkdays(startdate, enddate) is perfect.
If you want more details about the funtion :
https://learn.microsoft.com/en-us/dax/networkdays-dax
Let us know if it works or if you need more information
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
46 | |
26 | |
21 | |
12 | |
8 |
User | Count |
---|---|
75 | |
52 | |
45 | |
15 | |
12 |