Forum Discussion
Average for week
Hi patri0t82 ,
If you want the value be affacted by days/nights slicer, you will need to add FILTER() function in the formula, like:
calculate(avg(xxx),filter(allexcept(table,column),days/nights=selectedvalue(days/night)))
Best Regards,
Jay
Thank you for the response - I've transformed your code into this below, though it returns blank values.
- patri0t825 years agoPost Patron
I've JUST ABOUT got the result I need, but it doesn't show up in the visualization properly.
The code for my column is:
Average3 =
CALCULATE(
SUM('Daily Force Report (Site Resource Forecast)'[Total - Total_]),
FILTER(
ALLEXCEPT('Daily Force Report (Site Resource Forecast)','Daily Force Report (Site Resource Forecast)'[Week]),
[Days/Nights] = EARLIER('Daily Force Report (Site Resource Forecast)'[Days/Nights])))/5The correct numbers of 15.4 (Nights) and 135.4 (Days) are showing up for Week 6, HOWEVER, when I add this to the visualization, the numbers appear SUM into the thousands. I just need 15.4, 135.4 and 150.8 to show up for each day of that week. Not the sum of all of them.
Can somebody please lend their expertise. Thank you so much.