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

Need Your Help Community with Code that won't work

Have to 2 main files coming from SFDC into Qlikview (Activity and Owner).  Need to add a Sales Hierarchy to the Owner file once the table is in qv, but my qv person can't get the code to work.  Any thoughts? Comments?

SalesEngine:
Load
UserRoleId,
if(UserRole = '.ISR' OR UserRole = '.ISR Manager - Team 2' OR UserRole = '.VP Inside' OR UserRole= '.ISR Team 1' OR UserRole = '.ISR Team 2' OR UserRole= '.ISR Team 3' OR UserRole= '.ISR Team 4' OR UserRole= '.ISR Team 5' OR UserRole= '.ISR Team 6',  'ISR',
if(UserRole = '.ISR India/APAC' OR UserRole = 'Head of India/APAC', 'India/APAC',
if(UserRole = 'ISR EMEA' OR UserRole = 'ISR Manager EMEA', 'ISR EMEA',
if(UserRole = '.Account Manager' OR UserRole = '.Director Account Management', 'Account Managers',
if(UserRole = '.BDA' OR UserRole = '.BDA Manager', 'BDA',
If(UserRole= '.RSM Federal' OR UserRole= '.RSM Federal II', 'RSM - Fed',
if(UserRole = '.RSM Outside' OR UserRole = '.VP Outside & International', 'RSM - US',
if(UserRole = '.RSD International' OR UserRole = '.RSM International', 'RSM - EMEA','Other')))))))) as [Sales Engine Group]

FROM $(vQVDPath)UserRole_incr.qvd (qvd);

3 Replies
alexandros17
Partner - Champion III
Partner - Champion III

Check if  LOAD * FROM $(vQVDPath)UserRole_incr.qvd (qvd); works


Your expression is correct so the problem may be in your path variable ...

Not applicable
Author

Appreciate the feedback. I will have her check that.

Marc

its_anandrjs

Try the same script with the Match function

SalesEngine:

Load

UserRoleId,

if(Match(UserRole = '.ISR','.ISR Manager - Team 2','.VP Inside','.ISR Team 1','.ISR Team 2','.ISR Team 3','.ISR Team 4','.ISR Team 5','.ISR Team 6'),'ISR',

if(Match(UserRole = '.ISR India/APAC','Head of India/APAC'),'India/APAC',

if(Match(UserRole = 'ISR EMEA','ISR Manager EMEA'),'ISR EMEA',

if(Match(UserRole = '.Account Manager','.Director Account Management'), 'Account Managers',

if(Match(UserRole = '.BDA','.BDA Manager'), 'BDA',

If(Match(UserRole= '.RSM Federal','.RSM Federal II'), 'RSM - Fed',

if(Match(UserRole = '.RSM Outside','.VP Outside & International'), 'RSM - US',

if(Match(UserRole = '.RSD International','.RSM International'), 'RSM - EMEA','Other')))))))) as [Sales Engine Group]

FROM $(vQVDPath)UserRole_incr.qvd (qvd);