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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
etrotter
Creator II
Creator 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
sunny_talwar
MVP
MVP

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])

View solution in original post

2 Replies
YoussefBelloum
Champion
Champion

Hi,

your set analysis syntax is incorrect:

you should write it like this:

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

sunny_talwar
MVP
MVP

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])