Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
Arjunarao
Honored Contributor II

One year Sales calculation

Hi All,

I want to show the data for Sales from today to last year(today-365).

Sales should consider Sales for each Trans_ID where Flag='Y'.

For example:

First Transaction_Date for Trans_ID=1242 is 01/Jan/2014.

But I need to consider only from 30/Sep/2014 to 30/Sep/2015 as I am running today.Remaining Sales should be excluded.

Expression:

Sum({<Flag={'Y'},Year=, Quarter=, Month=,Transaction_Date={'>=$(=vStartDate)<=$(=vMaxDate)'}>}  Sales)

vStartDate=date(today()-365,'MM/DD/YYYY')

vMaxDate=date(today(),'MM/DD/YYYY')

But it is not working. Please help me. Thanks in advance.

1 Solution

Accepted Solutions
MVP
MVP

Re: One year Sales calculation

Change both the variables date formats to 'DD/MM/YYYY', like

  

=date(today(),'DD/MM/YYYY')

=date(today()-365,'DD/MM/YYYY')

1 Reply
MVP
MVP

Re: One year Sales calculation

Change both the variables date formats to 'DD/MM/YYYY', like

  

=date(today(),'DD/MM/YYYY')

=date(today()-365,'DD/MM/YYYY')