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: 
mid007
Contributor
Contributor

Set Analysis Number Issue

Hi,

Having an issue get it to work, I think its probably simple fix. It is just to get the sum of LAST_UNIQUE for the latest record of the variable Brand_Weeks=.

This set analysis work ---->     =sum({$<Brand_Weeks={47}>}LAST_UNIQUE)

But if I remove the number 47 and replace with a variable, Max(Brand_Weeks), that is numeric it doesn't work 

=sum({$<Brand_Weeks={Max(Brand_Weeks)}>}LAST_UNIQUE)

I set the variable Brand_Weeks to be a numeric in the load script using this  Num#(Brand_Weeks) as Brand_Weeks, I also tried Num(Brand_Weeks) as Brand_Weeks in the load script

 

Labels (1)
1 Solution

Accepted Solutions
andrew_smith200
Contributor III
Contributor III

SUM({$<Brand_Weeks={$(=Max(Brand_Weeks))}>} LAST_UNIQUE) should do it.

View solution in original post

2 Replies
andrew_smith200
Contributor III
Contributor III

SUM({$<Brand_Weeks={$(=Max(Brand_Weeks))}>} LAST_UNIQUE) should do it.

mid007
Contributor
Contributor
Author

perfect thank you