Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Last 3 months in Set Analysis

Good day

I have the following calculations on my set analysis:

sum({<L_WRITTEN_OFF_L3M_IND={'Y'}, L_CREDIT_DEBIT_IND={'DB'},L_NCA_PRODUCT_CODE={'UNL'}, L_NCA_IND={'J','Y','X'}>}[L WRITTEN OFF AMOUNT])

Now I want to use this set to calculate for the last three months.

Your assistance will be highly appreciated.

Kind regards,

Mbini

Labels (1)
10 Replies
Kushal_Chawda
MVP
MVP

Make sure that Your Date field is not the string, to check this create the Text object and put the expression "=max(Date)", if you get '-' means it is not in Date format, if you get the Values , it means it is in Date format.

If it is not in Date format, use Date# function to make it in Date format, then use below expression

sum({<

  L_WRITTEN_OFF_L3M_IND={'Y'},

  L_CREDIT_DEBIT_IND={'DB'},

  L_NCA_PRODUCT_CODE={'UNL'},

  L_NCA_IND={'J','Y','X'},

  Date ={">=$(=addmonths(max(Date),-3)) <=$(=max(Date))"}>} [L WRITTEN OFF AMOUNT])