0
votes

In Power Bi my average matters per day is not stopping on the current day.

Avg Per Day = DIVIDE([Matters],SUM(Dates[IsWorkday]))

where IsWorkday = IF(ISBLANK(Dates[Holiday]),IF(Dates[DayOfWeekNumber]>1&&Dates[DayOfWeekNumber]<7,1,0),0)

and Matters = COUNT(BillingData[Item])

So today is the 27th of the month so 18 of 20 work days are completed for the month. So need [matters]/18, not [matters]/20.

How do I factor that in to my average and not affect previous months.

Any help appreciated.

1

1 Answers

0
votes

Sounds like you need to just add one more condition to your if statement to add in that the date is less than todays date. Check out this post. I think it might have the solution to your problem or at least give you the idea you need to solve the issue.

https://community.powerbi.com/t5/Desktop/Networkdays-DAX-function/td-p/38044