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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
MikeGaunt1
Contributor II
Contributor II

Where Clause or Mapping

Hi, 

Basically I have a large set of data, that displays static settings for materials. 

I want to be able to either set up a small list within the load script so I can filter the load each time to see differing data. 

So for example 

Load 1 

filter for Material 

1

2

3

4

5

A few days later I only want to see the data for 

Materials 

6

7

8

9

10 

Script so far is 

Unqualify *;

[MARC_temp_87d861dd-71d5-4843-84d5-b2e661c5]:
LOAD
	[Purchasing Group] AS [MARC.Purchasing Group],
	[MRP Controller],
	[Plant] AS [MARC.Plant],
	[Material],
	[Maintenance status],
	[Plant-Sp.Matl Status],
	[MRP profile],
	[MRP Type],
	[Planned Deliv. Time],
	[GR processing time],
	[Lot Sizing Procedure],
	[Procurement Type],
	[Reorder Point],
	[Safety Stock],
	[Minimum Lot Size],
	[Maximum Lot Size],
	[Fixed lot size],
	[Mixed MRP],
	[In-house production],
	[Source list],
	[Consumption mode],
	[Bwd consumption per.],
	[Fwd consumption per.],
	[MRP Group],
	[Planning Strategy Group],
	[Safety Stock Method],
	[Minimum lot size],
	[Maximum lot size],
	[GR Processing Time],
	[GI Processing Time]
RESIDENT [MARC];

DROP TABLE [MARC];

[MRP_CONTROLLER_temp_d9326bb3-9f94-51c3-3548-54e12c25]:
LOAD
	[Plant] AS [MRP_CONTROLLER.Plant],
	[Purchasing Group] AS [MRP_CONTROLLER.Purchasing Group],
	[MRP Controller],
	[MRP controller name]
RESIDENT [MRP_CONTROLLER];
DROP TABLE [MRP_CONTROLLER];



RENAME TABLE [MARC_temp_87d861dd-71d5-4843-84d5-b2e661c5] to [MARC];

RENAME TABLE [MRP_CONTROLLER_temp_d9326bb3-9f94-51c3-3548-54e12c25] to [MRP_CONTROLLER];

 

Ideally I just want to be able to copy and paste a vertical list of materials, without having to add commas etc. 

Hope this make sense TIA

 

Labels (3)
1 Reply
vincent_ardiet_
Specialist
Specialist

You can maybe use an excel file to set the list of material you want to load and start with that, then use a Where Exists clause to filter. This will avoid to modify your code each time you want to change what is loaded.