
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
using functions within set analysis
In set analysis, can I use function to specify criteria? For example, I have date field available and I want to add up the current year data
Can I do something like sum({<YearName(date)= YearName{'$(=vCurrentCMonthYear)'}>}Amount)
Seems like it does not work as there probably different syntax I shoulde use for YearName(date)?
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No, You can't as Qlik has limit of left part of equal symbol not entry with calculated
You can try That in script like YearName(date) as date_set
then call it as
sum({<date_set= {'$(=YearName(vCurrentCMonthYear))'}>}Amount)
You can play with variable if equal / single quote issues ..

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try like this
=Sum({<[Posting Date] = {"=YearName(Today())"}>}[Amount])
What is your value in vCurrentCMonthYear

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No not this ways what is the value in vCurrentCMonthYear
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No, You can't as Qlik has limit of left part of equal symbol not entry with calculated
You can try That in script like YearName(date) as date_set
then call it as
sum({<date_set= {'$(=YearName(vCurrentCMonthYear))'}>}Amount)
You can play with variable if equal / single quote issues ..

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks, that is what I want to confirm before going to the variable part

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
is the current month and year like Sep-2017

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can do this with the NumMonth and Year field also which is dynamic to you also.
=Sum({<YearField = {"$(=Max(YearField))"}, NumMonth={"$(=Max(NumMonth))"}>} Amount)
