Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Is there a function within Qlik that allows me to supersede a value if it already exists?
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.
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
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
Thank you Rob. This is working very well. Is there any documentation on using the angle brackets within an expression?
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.
-Rob