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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
1600eads
Contributor III
Contributor III

supercede a value if this value already exist

Is there a function within Qlik that allows me to supersede a value if it already exists?

1600eads_1-1704736136237.png

The flow is when an order is picked up, it is pending and once it is shipped the status will update to complete. But I'd like to create a flag to make both rows as 'Complete' once the 2nd row is 'COMPLETE' but also retain my old data which is needed to find the days difference.

Thank you.

 

Labels (2)
1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Do you want to calculate this in the chart or the script?  

In the chart:

if (Max(TOTAL<ID> Match(STATUS, 'COMPLETE')), 'COMPLETE', STATUS)

In the script you might do something like this:

// Identify the completed IDs
MapCompletes:
MAPPING LOAD ID, 'COMPLETE'
From yourdata...
Where STATUS = 'COMPLETE';

// Load the data
Facts:
LOAD *,
  ApplyMap('MapCompletes', ID, STATUS) as NEW_STATUS
From yourdata...;

 

-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com

 

View solution in original post

3 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Do you want to calculate this in the chart or the script?  

In the chart:

if (Max(TOTAL<ID> Match(STATUS, 'COMPLETE')), 'COMPLETE', STATUS)

In the script you might do something like this:

// Identify the completed IDs
MapCompletes:
MAPPING LOAD ID, 'COMPLETE'
From yourdata...
Where STATUS = 'COMPLETE';

// Load the data
Facts:
LOAD *,
  ApplyMap('MapCompletes', ID, STATUS) as NEW_STATUS
From yourdata...;

 

-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com

 

1600eads
Contributor III
Contributor III
Author

Thank you Rob. This is working very well. Is there any documentation on using the angle brackets within an expression?

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

The angle brackets are a qualifier of the TOTAL keyword which in turn is a parameter of the Max() function.  If you look at the help for Max() you will find doc for the TOTAL keyword. 

https://help.qlik.com/en-US/sense/November2023/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/Basic...

-Rob