Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content
Announcements
Qlik Connect 2025! Where innovative solutions turn your data visions into reality: REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
KPage
Contributor III
Contributor III

Sales of Current week set expression

Hello, I have a variable set for the current week (MaxWeek). I am trying to get the sales for the current week. This is my expression but it is not working 

sum({
    <[Date]= { '$(MaxWeek)' }>
    }
    [Dollar Sales]
    )

 

Any suggestions?

Labels (3)
2 Replies
Chanty4u
MVP
MVP

May be missing "="

sum({<Date={'$(=MaxWeek)'}>} [Dollar Sales])

Or try this 

sum({<Week={$(=Week(Max(Date)))}>} [Dollar Sales])

 

pensa-qlik
Employee
Employee

Hey KPage,

I'm assuming that Date is a field your loading from your data? If so, and data profiling is on when you load then you should have a Date.Week option to use. Also, check the value that you're getting for your MaxWeek variable.

sum({ <[Date.Week]= { '$(MaxWeek)' }>    }    [Dollar Sales]    )

Hope this helps.