Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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

Re: Sum from start date to date selected

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

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

I have also attached the .qvw.

3 Replies

Re: Sum from start date to date selected

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

Re: Sum from start date to date selected

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

Re: Sum from start date to date selected

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

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

Community Browser