Skip to Content
0
Former Member
May 14, 2007 at 04:44 PM

Query: Making pct. calculations on cumulated rows.

11 Views

Hi Experts

I have a problem in a query. See the query below. The problem is that column 8 shows the same result as column 7 😔 What I find strange is that column 6 is just right - it shows the YTD-deviation, which I would like to show in pct in culumn 8.

Does anybody know how I can make the %Dev on the YTD numbers in column 8?

Rows:

- Calendar month2 (monthnumbers: "1", "2"..."12")

Columns (Units sold):

1. Actual Month: current calendar year, billed quantity

2. Actual Month LY:current calendar year -1, billed quantity

3. Actual Year To Date: current calendar year, billed quantity (cumulated)

4. Actual Year To Date LY: current calendar year -1, billed quantity (cumulated)

5. Dev Month: Actual Month - Actual Month LY

6. Dev Year To Date: Actual Year To Date - Actual Year To Date LY<b>(OK)</b>

7. %Dev Month: Actual Month % Actual Month LY

8. %Dev Year To Date: Actual Year To Date % Actual Year To Date LY<b>(NOT OK)</b>

Kind regards and thanks in advance,

Torben