Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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,
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])
can you send weekstartdate and id column data ?
hi @NitinK7 see attached
Count({$<WeekStartDate={">=$(=Date(Max(WeekStartDate), 'YYYY-MM-DD'))"}>} [%ID])
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])
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])
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])