Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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 ];
!PFA
I guess you have misunderstood the question. Please see the below screenshot.
P.S: I need to this in load script
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 ];
Hi,
Select Product, Value as dimensions of straight table, and write expression Count(Product)
Hope it will helpful!!
Faisal's solution working as expected. Thank you all.
oh..sorry. I misunderstood your requirement.
Shankar: Thanks for the reply. Have a nice day.
PFA
Output as per this requirnment.