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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

load script calculation

Okay guys,

Example:  (Now I need the possibility to calculate the purple header during the load script)

Red part I have already in my source

TABLE XYZ:

Field Header:         Order     |         Product      |         Customer       |     Qty. Products on Order     

Field Content:          A                     small                   John                                      3

                                A                      big                      John                                     3

                                A                      small                    John                                    3

                                B                      small                    Paul                                      1

This works:

TEST:
LOAD
A,
count(A) as QTY_A
RESIDENT TABLE_XYZ
group by A;

A     3

B     1

This doesn't work:

TEST:
LOAD
A,
count(A) as QTY_A,
if(wildmatch(PRODUCT,'small'),count(A),0) as QTY_small,
if(wildmatch(PRODUCT,'big'),count(A),0) as QTY_big
RESIDENT TABLE_XYZ
group by A;

expected result  

A   3    2   1

B   1    1    0

10 Replies
Not applicable
Author

THATS WHAT I NEED.

THANKS.