
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
count of values >= Current week
hi,
i have a measure that gives a count of future values. however i also want it to include the current week values as well, currently it is just showing me future values, even though i have >= sign.
Count({$<WeekStartDate={">=$(=Date(today(), 'YYYY-MM-DD'))"}>} [%ID])
my WeekStartDate are date formats that record every monday of each week both past and future:
when i select the current week number, my bar chart displaying nothing, even though it should display the current week records.
how do i format my above expression so that it also takes in the current week into the values and not just future records?
thanks,
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
it appears qlik thinks it is week 20 while for us here in ireland it is week 19. this worked:
Count({$<WeekStartDate={">=$(=Date(today()-7, 'YYYY-MM-DD'))"}>} [%ID])

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
can you send weekstartdate and id column data ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi @NitinK7 see attached


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Count({$<WeekStartDate={">=$(=Date(Max(WeekStartDate), 'YYYY-MM-DD'))"}>} [%ID])
If a post helps to resolve your issue, please accept it as a Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi @vinieme12 , your suggestion uses Max WeekStart Date. as i have future weeks going into 2023 in my dataset already this does not work. i need it to get the current week and future, currently i can only get future weeks using
Count({$<WeekStartDate={">=$(=Date(today(), 'YYYY-MM-DD'))"}>} [%ID])

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
it appears qlik thinks it is week 20 while for us here in ireland it is week 19. this worked:
Count({$<WeekStartDate={">=$(=Date(today()-7, 'YYYY-MM-DD'))"}>} [%ID])


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You need to create variable to support user behavior
for example if user hasn't selected any Date, then show data from today to future date
if user has selected a particular weekstartdate then show data from selected weekstartdate to future date
so variable
vDate = Date(if(getselectedcount(WeekStartDate), max(WeekStartDate) , Today() ),'YYYY-MM-DD')
Then use the variable
Count({$<WeekStartDate={">=$(vDate)"}>} [%ID])
If a post helps to resolve your issue, please accept it as a Solution.
