Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
Im trying to calculate the running total average for a week, week starts Sunday ends Saturday. On Wednesday for example I would like to show the totals for Sun, Mon,Tues, but divide that total by 2, not 3 excluding the weekend dates.
IF([DD_StateProduction$.Date]=max( TOTAL [DD_StateProduction$.Date]), sum([Total Drivers])/num(Weekday(today())), sum([Total Drivers])/5)
Thank you
Just add another flag field to mark weekdays and 1 and weekends as 0 , let's call it flag_Weekday: if Date =weekday then 1 else 0
Then assuming you have a calender in your data model
Sum({<Week={"=Max(Week)"}>}total divers)
/
Sum({<Week={"=Max(Week)"}>}flag_Weekdays)