Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
I would like to have the sum of the last day sales only, but I have a aggr error.
I have the folowing formula for the last day value:
if(max(total Date) = max(Date) and count(distinct Date)=1, [Sales(K$)],0)
with the following result:
Date | Product | Sales | Last day sales |
---|---|---|---|
25/5/2017 | Apple | 25k$ | 0$ |
25/5/2017 | Bananas | 30k$ | 0$ |
28/5/2017 | Oranges | 65k$ | 65k$ |
28/5/2017 | Apple | 21k$ | 21k$ |
The result expected is merely the sum of the last day sales, but it doesn't work:
sum(if(max(total Date) = max(Date) and count(distinct Date)=1, [Sales(K$)],0))
error: Nested aggregation not allowed
Could you please help?
Thanks in advance,
Nicolas
May be this
Sum(Aggr(If(Date = Max(TOTAL <Product> Date), Sales), Product, Date))
May be this
Sum(Aggr(If(Date = Max(TOTAL <Product> Date), Sales), Product, Date))
it works, thanks a lot Sunny