Qlik Community

Ask a Question

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
April 22, 2PM EST: Learn about GeoOperations in Qlik Sense SaaS READ MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
robin_heijt
Creator
Creator

Change set analysis to be included in script

Hi Guys,

 

I was wondering if anyone can help me change the following expression so it will be accepted by the data load editor?

The main reason for me not being able to do it, is because I do not know how to change the AGGR expresiion to work in the script. I know it needs to change to group by, but what about the rest of the set analsyis?

 

Thanks.

Spoiler
=if ("Cycle" <>'2018-2019', null(),
If(IsNull("OPR 2018"), (Null()),
if(IsNull("Movement Type"), (Null()),
if("OPR 2018" ='Not Rated', (Null()),
If("OPR 2018" ='1B' and "Movement Type" ='Termination Involuntary', ('Adherent'),
If("OPR 2018" ='1B' and "Movement Type" ='Termination Voluntary', ('Adherent'),
If("OPR 2018" ='1A' and "Movement Type" ='Termination Involuntary' , ('Adherent'),
If("OPR 2018" ='1A' and "Movement Type" ='Termination Voluntary' , ('Adherent'),
If("OPR 2018" ='1A' and "Movement Type" ='Lateral Move', ('Adherent'),
If("OPR 2018" ='1A' and "Movement Type" ='Demotion', ('Adherent'),
If("OPR 2018" ='2' and "Movement Type" ='Lateral Move' , ('Adherent'),
If("OPR 2018" ='2' and "Movement Type" ='Promotion Within Band', ('Adherent'),
If("OPR 2018" ='4A' and "Movement Type" ='Promotion Band Up', ('Adherent'),
IF(
AGGR(
IF(Count(DISTINCT {<[OPR 2018] = {'4A'}, Name *= p({<[Movement Type] = {'Promotion Band Up'} and not [Movement Type] = {'Termination Voluntary'} and not [Movement Type] = {'Termination Involuntary'}>})>} "Global ID")='1','Adherent'),"Global ID")
='Adherent', 'Adherent',
If("OPR 2018" ='3B' and "Movement Type" ='Lateral Move' , ('Adherent'),
If("OPR 2018" ='3B' and "Movement Type" ='Promotion Within Band', ('Adherent'),
If("OPR 2018" ='3A' and "Movement Type" ='Lateral Move', ('Adherent'),
If("OPR 2018" ='3A' and "Movement Type" ='Promotion Within Band', ('Adherent'),
If("OPR 2018" ='3A' and "Movement Type" ='Promotion Band Up', ('Adherent'),
If("OPR 2018" ='4B' and "Movement Type" ='Lateral Move' , ('Adherent'),
If("OPR 2018" ='4B' and "Movement Type" ='Promotion Within Band', ('Adherent'),
If("OPR 2018" ='4B' and "Movement Type" ='Promotion Band Up', ('Adherent'), ('Non-Adherent')))))))))))))))))))))))
Labels (1)
1 Reply
JordyWegman
Partner
Partner

Hi Robin,

Do the following:

  1. Get the if statement without the aggr working (example, call column AA)
  2. Get another load and replace the aggr by a group by (example, call column BB)
  3. Get this information BB in a mapping load and map this information, with some conditions to the previous table and where not, keep the old AA.

Jordy

Climber

Work smarter, not harder