Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld online is next week! REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Variable multiplicative date periods in set analysis

Hi All,

I'm trying to built a report which uses set analysis to separate invoiced products into periods that the user defines.

E.g.  I want to have variable columns created by the user using variable 'vVariableDateSearch', this creates periods such as 0-30 Days, 31-60 Days, 90+ Days etc.

The set analysis expression I've got for the second column is the following:

Sum({$<PLR_PLY_INVOICEDATE={">=($(=vCurrentDate)-$(=vVariableDateSearch)*2)<($(=vCurrentDate)-$(=vVariableDateSearch))"}>}PLR_PLY_T_DUEBYCLIENT-PLR_PLY_PAIDTODATE)

(Note, the strictly less than sign is intentional and that 'vCurrentDate' is the variable for today.)

However when I run this my output only shows $0.00's.  The other issue is that the below example seems to work:

Sum($<PLR_PLY_INVOICEDATE={">=($(=vCurrentDate)-$(vVariableDateSearch))<=$(=vCurrentDate)"}>}PLR_PLY_T_DUEBYCLIENT-PLR_PLY_PAIDTODATE)


I've also tried replacing section [$(=vCurrentDate)-($(=vVariableDateSearch)*2)] with [$(=vCurrentDate)-$(=vVariableDateSearch)-$(=vVariableDateSearch)] however this doesn't work either.

Can someone let me know where the issue in the expression might be?

Thanks and regards,

Nathan

0 Replies