Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Jozefswistak
Contributor
Contributor

Error in set ad hoc element list, when use code-implemented filters

Hello.
After using "Set current expressions" to apply a filter in a code of a Measure, I'm trying to set this filter to my own defined value. Here is a code:

sum({<ProductionDate={year(Today()-365}>}[ProductionQuantity])

I'm trying to do this, because I want to have both today and one year ago to aply these values in the same report in NPrinting.

But i return an ifo, that Error in set ad hoc element list.

The question is: is it possible to do like I want (set filter to one year back via code)? Or is it not possible?

Labels (2)
1 Solution

Accepted Solutions
maxgro
MVP
MVP

 

sum({$<ProductionDate={"$(=AddMonths(Today(),-12))"}>} [ProductionQuantity])

sum({$<ProductionDate={"$(=AddYears(Today(),-1))"}>} [ProductionQuantity])

 

you can find a handbook on set analysis here

https://community.qlik.com/t5/QlikView-Documents/Set-Analysis-syntaxes-examples/ta-p/1491810

 

View solution in original post

1 Reply
maxgro
MVP
MVP

 

sum({$<ProductionDate={"$(=AddMonths(Today(),-12))"}>} [ProductionQuantity])

sum({$<ProductionDate={"$(=AddYears(Today(),-1))"}>} [ProductionQuantity])

 

you can find a handbook on set analysis here

https://community.qlik.com/t5/QlikView-Documents/Set-Analysis-syntaxes-examples/ta-p/1491810