Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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

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