Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

etrotter
Contributor II

Set Analysis Help

Here is my formula:


  Sum({<[Activity Freeze Month Year Index] =Max({<[Month Year]=,Year = {'$(=Max({<[Month Year]=>}

  [Activity Freeze Year])-2)'}>}[Activity Freeze Month Year Index])>}[PL Counter])


If I just put :

=Max({<[Month Year]=,Year = {'$(=Max({<[Month Year]=>}   [Activity Freeze Year])-2)'}>}[Activity Freeze Month Year Index])


in a text box it works and returns a 12, but it's not working inside the formula. Please let me know if you have any ideas!


Thanks,

Erica

1 Solution

Accepted Solutions

Re: Set Analysis Help

Try this

Sum({<[Activity Freeze Month Year Index] = {"$(=Max({<[Month Year], Year = {'$(=Max({<[Month Year]>} [Activity Freeze Year]) - 2)'}>} [Activity Freeze Month Year Index]))"}>} [PL Counter])

2 Replies
YoussefBelloum
Esteemed Contributor

Re: Set Analysis Help

Hi,

your set analysis syntax is incorrect:

you should write it like this:

aggregation_function(    {<  FIELD={ }  >}    FIELD)

Re: Set Analysis Help

Try this

Sum({<[Activity Freeze Month Year Index] = {"$(=Max({<[Month Year], Year = {'$(=Max({<[Month Year]>} [Activity Freeze Year]) - 2)'}>} [Activity Freeze Month Year Index]))"}>} [PL Counter])

Community Browser