Forum Discussion
Kebas_Leech
3 years agoHelper I
Row context problem
Hello everyone, I have a daily target measure that calculates the targets for each day of the month based on a fixed monthly target: (the daily target is always the same each day of that specific...
some_bih
3 years agoCommunity Champion
Hi Kebas_Leech it seems you need to calculate NETWORKDAYS. Check links with examples. Hope this help
Kebas_Leech
3 years agoHelper I
Doesnt work. At least for two reasons:
1) I only have listed working days in my database
2) and even if a consider the following code:
Var Firstday = STARTOFMONTH(Tab_Origem[Data])
Var EndDay = ENDOFMONTH(Tab_Origem[Data])
Var HolidayDate = CALCULATETABLE(VALUES(Tab_Origem[Data]), 'Tab_Origem'[Holidays] = "Yes")
Var Net =
NETWORKDAYS(Firstday, EndDay, 1, HolidayDate)
It does the same mistake/problem that I had in the first post, and that is : Whenever the Tab_Origem[ Holidays] is "Yes" the corresponding date always has one less total day. Using the code i wrote here , the result is:
As you see the May 1st as one less day.
I want, in May , all days to be 30 because i only have 1 holiday in this month and all the other are workingdays.