Hi, it will be moving the 'where' conditions of each load to an if, like:
// Preceding LOAD to assign values based on 'KeyField' combination; just an example better if mapsubstring is used
//
https://help.qlik.com/es-ES/qlikview/November2018/Subsystems/Client/Content/QV_QlikView/Scripting/Ma...LOAD *
If(Subfield(KeyField, '-', 1)='UP', 'Unprocessed') as [Engineering Category Status],
If(Subfield(KeyField, '-', 2)='EOE', 'Electrical Order Engineering') as [Engineering Category]
;
LOAD,
If( // UP-EOE: Check for Uprocessed - Electrical Order Engineering
EEPR = ' '
AND EEED = ' '
AND EDFR = ' '
AND (ANT01 = 'SPECIAL' OR ANT02 = 'SPECIAL' OR ANT03 = 'SPECIAL' OR ANT04 = 'SPECIAL')
AND ApplyMap ('Electrical Order Engineering Material Exclude Map', ApplyMap ('Engineering Category Plant', [Sales Document Item Key], Null ()) & ' ' & ApplyMap ('Engineering Category Material', [Sales Document Item Key], Null ()), Null ()) = 'N', 'UP-EOE',
// UP-EPE: Check for Unprocessed - Electrical Production Engineering
(EEED = 'X' OR (ANT01 <> 'SPECIAL' AND ANT02 <> 'SPECIAL' AND ANT03 <> 'SPECIAL' AND ANT04 <> 'SPECIAL'))
AND EEUN = 'X'
AND EEFR = ' '
AND EDFR = ' '
AND ApplyMap ('Electrical Production Engineering Material Exclude Map', ApplyMap ('Engineering Category Plant', [Sales Document Item Key], Null ()) & ' ' & ApplyMap ('Engineering Category Material', [Sales Document Item Key], Null ()), Null ()) = 'N',
// Next case...
)) as KeyField