Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

cancel
Showing results for 
Search instead for 
Did you mean: 
qlikviewwizard
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
tresesco
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
tresesco
MVP
MVP

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

  

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

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