4 Replies Latest reply on Mar 31, 2016 2:02 PM by Łukasz Majewski

Calculation won't total

Unfortunately, I can't share the data that I'm using.

I've created a calculation, IF [WO per Store] > WINDOW_AVG([WO per Store]) then 1 else 0 END so that I can count when a location has more than the average, and I want to view how many locations in total are above the average. But when I put this in a table, all the other fields total, but this ends with 0, even though the table above will have values. I hope I've explained it well. All I can provide is a screenshot.

• 1. Re: Calculation won't total

What is the definition of [WO per Store]?

• 2. Re: Calculation won't total

Work Order per Store. I’ve figured that the average store has 28 work orders, but I want a count of how many stores are over the average. And that average is dynamic, so based on what filters we may use, it’ll change. And then we’ll want that total to also change.

Thank you!

• 3. Re: Calculation won't total

It will be helpful if you simply paste all the fields definitions so that we could see what aggregation you used and if there are any nested table calcs. I assume you have COUNT([x]) in there.

It seems like you also might need to increase the level of detail:

1. Duplicate your [store] dimension field and place it in details shelf [store (copy)]

3. Create another calculation like this:

```    IF first()=0 and last()=0 then [Over Avg]
ELSE IF FIRST()=0 THEN WINDOW_SUM([Over Avg]) END END
```

and set this outer calc to compute using [store (copy)]

See the attached 9.2 wb - Sheet2 - for reference as it is analogous to yours I guess

• 4. Re: Calculation won't total

You probably may also use much simpler LoD solution like Sheet3 here: