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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to generate dateflags?

Hi Everyone,

I have a table with three columns. Name, Startdate and Enddate. Now i wish to generate flags in my date-modell for all rows in my table. For example i have this table

NameStartDateEndDate
CurrH2009063120091231
NextH201005312010127
PrevH2008041420090117

I want to do something like this

if(StartDate<Date and EndDate>=Date, 1) as Name,

But i want to do it for all rows without any hardcoding.

Any ideas how to do this? (something with loop i quess)

Regards

Daniel

3 Replies
Not applicable
Author

Hi Daniel,

What do you want really? add a field on load script comparing the date fields agains the today date? or make a calculated dimension based in the condition?

I need more information for helping you.

Best regards.

Not applicable
Author

Hi,

What I want to do is to generate flags automaticly.I have created a date-table with all dates two years back. I have some flags ie YTD, LYTD, MTD and so on.

Now i want to add more flags (in the script) that is defined in an xls-table. The table consists of 20-30 different dateintervalls that can be changed by a superuser. I dont want to hardcode start/stop dates for each flag. So I want to generate flags in the scipts named after the row in the table and intervall between StartDate and EndDate. (the first row should look something like this if(20090631<Date and 20091231>=Date, 1) as CurrH, and so on....

Regards

Daniel

Not applicable
Author

Use "IntervalMatch". See help for example.