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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
klam0001
Contributor
Contributor

Max week set analysis

Hi,

For my Dashboard KPI, I want to show the data of the current week regardless of any other selections made (this value should never change).

The following expression is what I used:

=Sum({1<_WeekSerial = {$(=max(_WeekSerial))}>} [Count])

I thought the set identifier {1} was used for this exact purpose, however when I select another month it will still take the last week of that month only. I'm guessing this is because of =max().

Is there another way to do it, without adding any variable or changing anything in the script.

Thanks!

1 Solution

Accepted Solutions
sunny_talwar

Try this

=Sum({1<_WeekSerial = {$(=max({1} _WeekSerial))}>} [Count])

View solution in original post

2 Replies
sunny_talwar

Try this

=Sum({1<_WeekSerial = {$(=max({1} _WeekSerial))}>} [Count])

jmmolero
Partner - Creator
Partner - Creator

Hi,

add {1}  to max(..):

Sum({1<_WeekSerial = {$(=max({1}[_WeekSerial]))}>} [Count])