Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

QlikSense Script: Replace a value in Status field based on Datefield

Hi,

I want to flag certain days to for all Employees to Status = 1.

My Qvd now looks like this(without Employee information) with only Status and WDIDate.

What  I want is to add _MappedStatus with current Status-values, but with status-value set to 1 on certain dates.

On WDIDate like '20180521', I want _MappedStatus = 1 (as shown in .xlsx extract in the bottom of the post)

StatusTable.png

To map certain values based on Datefield I have created a map table as xlsx.

MappedDates.png

I've tried some sort of ApplyMaps, but that just gives me the orignial values as shown in the first picture.

Any suggestions is well appreciated.

Thanks in advance!

/Henrik

1 Solution

Accepted Solutions
bwisealiahmad
Partner - Specialist
Partner - Specialist

Hi,

Make sure that the fields you are mapping have the same field type e.g Date mapping to a Date column or else make them both text and try then

View solution in original post

1 Reply
bwisealiahmad
Partner - Specialist
Partner - Specialist

Hi,

Make sure that the fields you are mapping have the same field type e.g Date mapping to a Date column or else make them both text and try then