Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a simple data set:
In a Pivot table, I am showing cases where the sell price increased month over month with a 1 and if they went down with a -1 by using the following formula:
If(Sum([Sell Price]) - Before(Sum([Sell Price])) <0, -1,
If(Sum([Sell Price]) - Before(Sum([Sell Price])) >0, 1, 0))
However, I wish to show the total number for the company (i.e. February should show 2 not 1 as the total).
I tried several combinations of Aggr functions, but none of them returns any values. Example below -- any advice?
Aggr(
Sum(
If(Sum([Sell Price]) - Before(Sum([Sell Price])) <0, -1,
If(Sum([Sell Price]) - Before(Sum([Sell Price])) >0, 1, 0))
)
, Company, Product, Month
)
They either return nulls or 0s in the pivot table depending on the order and if it is before/after the if statements.
May be this
sum(aggr(
rangesum(above(
Sum(
If(Sum([Sell Price]) - Before(Sum([Sell Price])) <0, -1,
If(Sum([Sell Price]) - Before(Sum([Sell Price])) >0, 1, 0))
)
,0, rowno()))
,Company, Product, Month ))
Hi Bruno, thanks for trying to help. Unfortunately, this just results in the table returning 0 for all rows/columns.