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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
zwyne
Creator
Creator

Scripting Question

Hi there,

PFA

I would like create a variable which contains a list of BUs and then use it to populate new field. Please see below

Temp:
LOAD  [Dynamic Field Source Option ID],
[Dynamic Field ID],
[Dynamic Field Source Option Value],
[Dynamic Field Data ID],
[Audit ID],

if(Match( [Dynamic Field Source Option Value],'RBB','Technology','QA & PP','COO','Functions','CIB','WIMI','RoA Banking'),[Dynamic Field Source Option Value]) as [Internal Audit Team]

FROM $(vPath)\DynamicData_Value.qvd (qvd);

Map_DDField_Value1:
Mapping LOAD  [Audit ID] AS [TEMPAudit ID],
[Internal Audit Sub Team]
Resident Temp;

So what I want to do is

LET vBU= (list of values from BU field)

then If(match( [Dynamic Field Source Option Value],$(vBU)) as [Internal Audit Team]

Regards

1 Solution

Accepted Solutions
zwyne
Creator
Creator
Author

Thank you Kaushik, it gives an this error

I cannot see where I missing a bracket but from the variable created vBu ,it does not misses some apostrophes i.e '

View solution in original post

4 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

You can try this.

One Way:

Load BU from XYZ;

Load *,If(Exists(BU,[Dynamic Field Source Option Value]),BU) as InternalAuditTeam

From xyz;


Second: (Using Variable)

Temp:

Load Concat(DISTINCT BU,',') as BU from XYZ;


Let vBU = Peek('BU',0,'Temp');


Load *, If(Wildmatch([Dynamic Field Source Option Value],$(vBU)),[Dynamic Field Source Option Value]) as InternalAuditTeam

From PQR;


Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
zwyne
Creator
Creator
Author

Thank you Kaushik, it gives an this error

I cannot see where I missing a bracket but from the variable created vBu ,it does not misses some apostrophes i.e '

zwyne
Creator
Creator
Author

I have figured out the problem. Thank you

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Perfect.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!