Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a series of records with date fields ('MM/DD/YYYY'), and during the load process i would like to set two flags:
1_Week_flag and 2_Week_flag:
that groups the dates in two buckets from the current week start. The daily load will refresh the flags as the weeks roll forward.
Then use the flag in a set analysis statement to show one or two weeks of data in a bar-chart.
Any Ideas are appreciated
if(inweek(startdate,today(),0) or inweek(startdate, today(),1),1) as next_week_flag, perhaps?
Hi,
there is a function "inweek()" you could use to flag the records.
inweek - Skript- und Diagrammfunktion | Qlik Sense unter Windows Hilfe
Yes I saw the inweek function only works for reading the current week or the next week.
inweek(startdate, today(),0) as current_week_flag;
inweek(startdate, today(),1) as next_week_flag;
I need to have it pull the current and next week in one bucket not separate flags?
if(inweek(startdate,today(),0) or inweek(startdate, today(),1),1) as next_week_flag, perhaps?
Perfect Thank you