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

Load only few values of an column.. not all

Hi Experts - I have a below data

Fruits

Apple

Orange

Grape

Mango

Banana

I just need to load Apple & Grape alone.. Please help me how can i get this..

1 Solution

Accepted Solutions
Anil_Babu_Samineni

My bad, Missed Where condition

LOAD SALES_PROD_W_OPTION_NR,

    PART_DN,

    LOCAL_STD_COST_AM,

    ISO_CURRENCY_CD,

    CURRENCY_RATE,

    USD_STD_COST_AM,

    PRODUCT_LINE_CD,

    PROD_LINE_NM,

    FRUIT

FROM

C:\Users\Public\Desktop\Reports\CSV_Files\WW_IPG_INVENTORY_WEEKLY_HISTORY.csv

(txt, codepage is 1252, embedded labels, delimiter is ',', msq) Where Wildmatch(field, 'value1','value2');

STORE IPG_Inventory INTO ;

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

22 Replies
PrashantSangle

Hi,

You can use wildmatch() in where clause

like

Load * from TableName

where wildmatch(FieldName,'Apple','Grape');

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Anil_Babu_Samineni

Like this?

Load * From Table Where Match(Fruits, 'Apple', 'Grape');


In front end you can use expression as

If(Match(Fruits, 'Apple','Grape'), Fruits)


Note - You will get bulk posts related this? You may start this in community

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
PrashantSangle

Or If there are multiple value for that you want to restrict data then maintain a mapper file which contain only those value which you want to display and In your final table use where exist()

Like

mapper:

Load * INLINE [

Fruit

Apple

Grape

];

NoConcatenate

FinalTable:

Load * from YourTableName

where exists(Fruit,Fruit);

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
arvind_patil
Partner - Specialist III
Partner - Specialist III

Hi Bharani,

You can use Code Like Below:

T:

Load * Inline [

Fruits

Apple

Orange

Grape

Mango

Banan];

NoConcatenate

FinalTable:

LOAD *

Resident T

Where WildMatch(Fruits,'Apple','Grape');

Drop Table T;

Thanks,

Arvind Patil

bharani8
Creator III
Creator III
Author

Am new to this tool.. Can u share how this is done in the script after loading a sample table please.. I know to do it in Front end.. but not while loading the data itself

bharani8
Creator III
Creator III
Author

Am new to this tool.. Can u share how this is done in the script after loading a sample table please.. I know to do it in Front end.. but not while loading the data itself

bharani8
Creator III
Creator III
Author

Am new to this tool.. Can u share how this is done in the script after loading a sample table please.. I know to do it in Front end.. but not while loading the data itself

arvind_patil
Partner - Specialist III
Partner - Specialist III

HI Bharani,

Please check above script;

Thanks ,

Arvind Patil

Anil_Babu_Samineni

Nothing new, This works as Where condition in SQL / Any DB. Let's consider as your data set

LOAD * Inline [

Fruits

Apple

Orange

Grape

Mango

Banana

] Where Match(Fruits, 'Apple', 'Grape');


What we are doing here is we have DB data sent in that we need to figure it out which values you need  by help of Wildmatch for showing them we are using Where condition


If you want, More info related WildMatch look at wildmatch ‒ QlikView

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful