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: 
Not applicable

add current week in set analysis

hi,

I've got some problem with adding a clause for the current week in a set analysis statement.

I am trying to count a number of records within the period of the current week.

i have tried the following to make sure the overall statement is correct:

=count ({$<CalendarEnd.Kalenderwoche = {17}>) [%MA ID])

     'CalendarEnd.Kalenderwoche' represents the weekofYear,

     '17' is the current week

so far so good - now i tried to replace the '17' with a phrase to make sure i always get the current week.

i tried some diffrent approaches but neither worked. here is one example:

= count ({$<CalendarEnd.Kalenderwoche ={=$(=week(today()))}>} [%MA ID]))

im sure the there must be a relative easy solution but im get stuck

so if anyone is able to help me i would be much obliged.

thanks

1 Solution

Accepted Solutions
Not applicable
Author

=count ({$<CalendarEnd.Kalenderwoche= {$(=week(today()))}>}[%MA ID])

View solution in original post

2 Replies
Not applicable
Author

=count ({$<CalendarEnd.Kalenderwoche= {$(=week(today()))}>}[%MA ID])

Not applicable
Author

I tried, but it says: 'Error in set modifier element function name' Expression is OK, but it shows no results.

I also tried to declare CurrentWeek in the script and then put this as variable into the expression:

= count ({$<CalendarEnd.Kalenderwoche ={'(CurrentWeek)'}>} [%MA ID])

but it also doesnt work (Expression is OK, but it shows no results)

Thanks a lot - it worked