Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
maxime66
Creator
Creator

Set analysis

Hi !

I would like to get  ( in the Blue text box of the Qkw file joined ),the sum(CA1)  for January 2014 (100 €).

This box must report for each month of  "Date_ca" the sum(CA1) for the previous year (don't know if very clear )

Thanks for your time.

1 Solution

Accepted Solutions
Anonymous
Not applicable

This is correct, but why don't use date formatting functions instead of string functions.  It is much easier:

=sum( {1 <annee_mois={ "$(=date(addyears(date#(Date_ca,'YYYYMMDD'),-1),'YYYY/MM'))"} > } CA1)

View solution in original post

5 Replies
Anonymous
Not applicable

Hi Maxime, try this:

=sum( {1 <annee_mois={ "$(=left(Date_ca,4)-1 & '/' & $(=mid(Date_ca,5,2) ) )"} > } CA1)

reshmakala
Creator III
Creator III

Find attached solution

Anonymous
Not applicable

This is correct, but why don't use date formatting functions instead of string functions.  It is much easier:

=sum( {1 <annee_mois={ "$(=date(addyears(date#(Date_ca,'YYYYMMDD'),-1),'YYYY/MM'))"} > } CA1)

maxime66
Creator
Creator
Author

Thanks Michael,  Works perfectly !

You're right, date formatting is better !

++

Anonymous
Not applicable

Hello maxime66, please close the thread selecting what answer was helpful or the solution, in order to help the rest of users to search threads with correct answers.

Thank you.