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

Limiting Data load with variable match expression

I need to figure out how to limit that data load by anything that has a load number of any of the below'MA1001','MA1002','MA1003','MA1004','MA1005','MA1006','MA1007','MA1008','MA1009','MA1010','MA1011'

 

I have tried setting the variable at the beginning of the load script as:

let vLoadNumber= if(match([Load Number],'MA1001','MA1002','MA1003','MA1004','MA1005','MA1006','MA1007','MA1008','MA1009','MA1010','MA1011'),[Load Number]);

 

and then calling it in the table load as follows:

[RU Table]:
LOAD
[RU] as RUTable.RU,
[RU Description],
[RU Name] AS [RU Table.RU Name],
[Level 3] AS [RU Level 3],
[Level 2] AS [RU Level 2],
[Level 1] AS [RU Level 1],
[Load Number],
[ELT],
[Sort Order] AS [RU Sort Order]

FROM [Metadata Tables.xlsm]
(ooxml, embedded labels, table is [RU Table])
Where [Load Number]='$(vLoadNumber)';

 

I can't get it to work right when I run the load. 66 Records should load from the RU table, and I'm getting 0. Any help would be greatly appreciated!

 

Labels (2)
1 Reply
mato32188
Specialist
Specialist

Hi Pthester416,

what you expect to be done is something like listed below?

set vLoadNumber = match([Load Number],'MA1001','MA1002','MA1003','MA1004','MA1005','MA1006','MA1007','MA1008','MA1009','MA1010','MA1011');

[RU Table]:
LOAD
[RU] as RUTable.RU,
[RU Description],
[RU Name] AS [RU Table.RU Name],
[Level 3] AS [RU Level 3],
[Level 2] AS [RU Level 2],
[Level 1] AS [RU Level 1],
[Load Number],
[ELT],
[Sort Order] AS [RU Sort Order]

FROM [Metadata Tables.xlsm]
(ooxml, embedded labels, table is [RU Table])
Where $(vLoadNumber);

BR

Martin

ECG line chart is the most important visualization in your life.