Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Map in two places????

I have one table with two columns; UserName and SessionStartedDate. I need to add a 3rd column to this table which is called 'Was an active primay user on this date' and populate the it with YES or NO.

The data for this third column comes from a second table with two columns; UserName and 'Date of snapshot'

The slight issue I have is that the snapshot data in the 2nd table is taken on a weekly basis. So what i need to do is insert YES in the 'Was an active primay user on this date' column if the UserName matches and if the 'Date of snapshot' is in the same week as the SessionStartedDate. If there is no match, insert NO instead.

I have attached some sample data, with the two tables on separate tabs.

3 Replies
Esteemed Contributor

Re: Map in two places????


if I understand you correctly, you just want to check whether any username in your weekly_snapshot_table is in that two-column mapping table you have?

If that's correct, you can easily do that in a LOAD statement using a WHERE EXISTS() clause.


Best regards,


Not applicable

Re: Map in two places????

It's not quite that simple. In the weekly snapshot table, the list of usernames varys from week to week.

Therefore the two dates must ALSO be in the same week for the value to appear as YES

Not applicable

Re: Map in two places????

Hi Alex, Please give clarify on the below items:

1. The second table ( UserName & DateOfSnapShot) having more than one DateofSnapshot value for each User? In this case you need to verify the SessionStartedDate against all the dates or take the latest DateofSnapshot for verification ?

2. Do you need check Weekstart of the SessionStartedDate against DateofSnapshot ?

Community Browser