Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Can someone help me how to allocate the product by ID. Please refer screenshot below for example.
LOAD * INLINE [
ID, Product
1, AAA
1, BBB
2, AAA
3, AAA
3, BBB
3, CCC
3, DDD
3, EEE
4, CCC
5, DDD
5, GGG
5, HHH
];
Like this
Table:
LOAD * INLINE [
ID, Product
1, AAA
1, BBB
2, AAA
3, AAA
3, BBB
3, CCC
3, DDD
3, EEE
4, CCC
5, DDD
5, GGG
5, HHH
];
Left Join (Table)
LOAD ID,
1/Count(Product) as NewField
Resident Table
Group By ID;
May be this
Dimensions
ID
Product
Expression
1/Count(TOTAL <ID> Product)
Sample and image attached
Thanks sunny working well, one morething, how can we add this script (1/Count(TOTAL <ID> Product)) in Load script?
Like this
Table:
LOAD * INLINE [
ID, Product
1, AAA
1, BBB
2, AAA
3, AAA
3, BBB
3, CCC
3, DDD
3, EEE
4, CCC
5, DDD
5, GGG
5, HHH
];
Left Join (Table)
LOAD ID,
1/Count(Product) as NewField
Resident Table
Group By ID;