Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Master II
Master 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
Highlighted
MVP
MVP

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

  

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

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

View solution in original post

1 Reply
Highlighted
MVP
MVP

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

  

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

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

View solution in original post