Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm struggling to calculate sales from the beginning of the data to the date selected.
In the example I've put together I want to sum the sales from the beginning of the year to what ever date I select. I'm not sure where it is I'm falling over.
Your help would be much appreciated. Thanks in advance.
C
I made a text box with this expression, which seems to be working.
=sum({1<Date = {'<=$(=vDateSel)'}>} Sales)
I have also attached the .qvw.
I made a text box with this expression, which seems to be working.
=sum({1<Date = {'<=$(=vDateSel)'}>} Sales)
I have also attached the .qvw.
That works well.
I wanted it in a table so I added "Total" just after the sum so it now reads
=sum(Total{1<Date = {'<=$(=vDateSel)'}>} Sales).
Thanks again
C
Also, if you need to make sure it is greater than the Start Date, you can use:
=sum({1<Date = {'>=$(=vDateStart)'}, Date = { '<=$(=vDateSel)'}>} Sales)