Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone, in the below table, I want to calculate the value of the total sales target divided by the count of dates.
At the moment it's only returning the correct value at the total level and not the date level. What I want is to get the sales target value for each date so I can then do a cumulative sum as in the second table below
Thanks for all your help.
For each row you are dividing the Total Sales by one, because at the row level count(distinct(Date)) = 1.
You could try count(total distinct(Date)) instead?
could you tell us what expression you are using in your example?
Hi,
I'm using
sum(TARGET) / count(distinct(Date))
For each row you are dividing the Total Sales by one, because at the row level count(distinct(Date)) = 1.
You could try count(total distinct(Date)) instead?
That worked, thank you Benjamin🙂
Hi again,
Now I'm trying to add the actual sales value but again, it's returning the total value for each day as opposed to the sales amount per day.
The expression for my actual is:
sum({<Date*={"$(vCalRange)"},[Invoice Type]*={'Invoice'}>}AMOUNT * SELL_RATE)