Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sum from start date to date selected

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

1 Solution

Accepted Solutions
Nicole-Smith

I made a text box with this expression, which seems to be working.

=sum({1<Date = {'<=$(=vDateSel)'}>} Sales)

I have also attached the .qvw.

View solution in original post

3 Replies
Nicole-Smith

I made a text box with this expression, which seems to be working.

=sum({1<Date = {'<=$(=vDateSel)'}>} Sales)

I have also attached the .qvw.

Not applicable
Author

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

Nicole-Smith

Also, if you need to make sure it is greater than the Start Date, you can use:

=sum({1<Date = {'>=$(=vDateStart)'}, Date = { '<=$(=vDateSel)'}>} Sales)