Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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
User | Count |
---|---|
54 | |
23 | |
19 | |
18 | |
17 |
User | Count |
---|---|
91 | |
87 | |
47 | |
30 | |
22 |