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

Count duplicate - Load Script

Hello,

I have two excel files, one is source file and another is mapping file. In source file, I have unique products and want to map this with mapping file to find out the frequency. Say for example, I have a product name called "A" in source file and mapping file have 6 entries. I just want to count this while loading (A new column would be fine). Any Idea ?

Thank you.

1 Solution

Accepted Solutions
Not applicable

xl1:

Load Product, Count(Product) As Cnt Group By Product ;

LOAD * Inline

[Product, Value

A,12

A,5

A,56

B,2

B,3

C,4

D,6

E,5 ];

xl1:Load Product, Count(Product) As Cnt Group By Product ;LOAD * Inline[Product, ValueA,12A,5A,56B,2B,3C,4D,6E,5 ];

View solution in original post

8 Replies
Siva_Sankar
Master II
Master II

!PFA

tamilarasu
Champion
Champion
Author

I guess you have misunderstood the question. Please see the below screenshot.

Capture.PNG

P.S: I need to this in load script

Not applicable

xl1:

Load Product, Count(Product) As Cnt Group By Product ;

LOAD * Inline

[Product, Value

A,12

A,5

A,56

B,2

B,3

C,4

D,6

E,5 ];

xl1:Load Product, Count(Product) As Cnt Group By Product ;LOAD * Inline[Product, ValueA,12A,5A,56B,2B,3C,4D,6E,5 ];

Anonymous
Not applicable

Hi,

Select  Product, Value as dimensions of straight table, and write expression Count(Product)


Hope it will helpful!!

tamilarasu
Champion
Champion
Author

Faisal's solution working as expected. Thank you all.

Siva_Sankar
Master II
Master II

oh..sorry. I misunderstood your requirement.

tamilarasu
Champion
Champion
Author

Shankar: Thanks for the reply. Have a nice day.

ankitbisht01
Creator
Creator

PFA

Output as per this requirnment.