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: 
Not applicable

conditions in set analysis

Hi everyone,

I am totally new to Qlik in general and I have a problem :

I want to sum all the products for the current year but i don't know how to formulate it.

sum({<{ "$(Yearname(Month))" } = { "$(=Yearname((Today(),0)))" }>} Products)

This is the formula I try to use but it does not work and I am not experienced enough to understand where is the problem.

Thanks for your help

1 Solution

Accepted Solutions
Gysbert_Wassenaar

If you have a year field use sum({<YearFieldHere  = {'$(=Year(ToDay()))'} >} Products). If you don't have a year field create one in the script from your date field.


LOAD

     Date,

     Product,

     Year(Date) as YearFieldHere

FROM

     ...

     ;


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Anonymous
Not applicable
Author

HI,

FIrst you need to have a filed consisting the Year for the data.

Then You can write the expression ass

sum({<Year={$(=year(today()))}>}Products)

Gysbert_Wassenaar

If you have a year field use sum({<YearFieldHere  = {'$(=Year(ToDay()))'} >} Products). If you don't have a year field create one in the script from your date field.


LOAD

     Date,

     Product,

     Year(Date) as YearFieldHere

FROM

     ...

     ;


talk is cheap, supply exceeds demand