Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Between Date in Set Analysis

Hi All

Thanks very much in advance

I am trying to sum of amount for date which between

=Sum({<LItem= {'Net Charge'}, xDate = {">=$(=MonthStart(AddMonths(GDate, -12))) <=$(MonthEnd(Addmonths(GDate, -1)))"}>} Amount)

(Some problem in above Set Ana

Any idea please

Thanks


4 Replies
Nicole-Smith

You're missing an = in the second dollar sign expansion:

=Sum({<LItem= {'Net Charge'}, xDate = {">=$(=MonthStart(AddMonths(GDate, -12)))<=$(=MonthEnd(Addmonths(GDate, -1)))"}>} Amount)

Not applicable
Author

Let me clarify please

GDate is DIMENSION here

I need total AMOUNT for last 12 months based on GDate

Meaning

xDate >= AddMonth(gDate, -12) and xDate <= gDate 

No variable here

Still not work

Nicole-Smith

If GDate is your dimension, you can't sum values for other GDates, even by putting it in the set analysis.  You either need to change your dimension, or look at calculating it in the script.

Not applicable
Author

Hi Nicole

I appreciate your efforts and valuable help

Here

GDate is dimension but I am using xDate and xBalance from another table

GDate is for comparison only

Thanks