Harnish - Maybe try removing the SUM aggregation for the denominator. 80 should be a constant I am assuming, so only sum(hours)/80 should work. If not, I suggest attaching some sample rows of your dataset.
Not sure I understand your request correctly, but tried to create something.
[Count pay period]
count([5. Pay Period])
sum([Hours])/([Count pay period])
pay_period_9.0.twbx 23.5 KB
1 of 1 people found this helpful
Based on the screenshots your results are correct for both the scenarios. Based on what you want though, you may want to try:
SUM(2014 Hours)/(80*COUNTD(Pay Period))
This should work for both scenarios, because when pay period is in the view countd(pay period) should be 1 and hence the division by 80. When it is not in the view, it would be number of pay periods in that year. Hope that works.
That's correct, Pooja, Thank you!
Great, please close the thread by marking my answer as correct for others to see it when they search for a similar topic. Glad that helped!