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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
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
Partner - Champion III
Partner - Champion III

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
Partner - Champion III
Partner - Champion III

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