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

MTD set analysis

Hi, could you please let me know what I'm doing wrong:

Sum({$<Month(Date)=$(vCurrentMonth)>}[Total Revenue])

vCurrentmonth=Max(Month(Date))

Thanks in advanced!

1 Solution

Accepted Solutions
etrotter
Creator II
Creator II
Author

Got it!

Sum({<[EntryYearMonth]={"$(=MaxString([EntryYearMonth]))"}>}[Total Revenue])

View solution in original post

3 Replies
sunny_talwar
MVP
MVP

You cannot use Function on the left hand side of the set modifier... create Month(Date) as Month in the script and then use it like this

Sum({<Month = {'$(=Max(Month)'}>} [Total Revenue])

etrotter
Creator II
Creator II
Author

its still not working, I do have a 'month' field in the model but it is unrelated to total revenue. The table is related to the 'date' field

etrotter
Creator II
Creator II
Author

Got it!

Sum({<[EntryYearMonth]={"$(=MaxString([EntryYearMonth]))"}>}[Total Revenue])