Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I'm having trouble counting occurence of words in a colum.
This is what I have:
| CUSTOMER | PRODUCT |
|---|---|
| CUSTOMER 1 | PRODUCT 1 |
| CUSTOMER2 | PRODUCT 3 |
| CUSTOMER 3 | PRODUCT 2 |
| CUSTOMER 4 | PRODUCT 3 |
| CUSTOMER 5 | PRODUCT 2 |
Also, the column PRODUCT is an expression colum (firstsortedvalue)
What i'm looking for is the number of times PRODUCT 1, PRODUCT 2, PRODUCT 3 are occuring.
So i would like somthing like that:
| PRODUCT | OCCURENCE |
|---|---|
| PRODUCT 1 | 1 |
| PRODUCT 2 | 2 |
| PRODUCT 3 | 2 |
Thanks a lot
HI
SEE ATTACHEMENT
TAKE PIVOTE TABLE
DIMENSION- PRODUCT
EXPRESSION - COUNT(PRODUCT)
then output like this
| PRODUCT | Count(PRODUCT) |
| P1 | 1 |
| P2 | 2 |
| P3 | 2 |
*********************************************************************************************
OR IF YOU WRITE AT SCRIPT LABEL---
A:
LOAD CUSTOMER,
PRODUCT
FROM
C:\Users\vishwaranjan\Desktop\TEST8.xlsx
(ooxml, embedded labels, table is Sheet1);
load PRODUCT, count(PRODUCT) AS OCCURENCE
RESIDENT A Group BY PRODUCT;
THEN OUTPUT LIKE THIS--
| PRODUCT | OCCURENCE |
| P1 | 1 |
| P2 | 2 |
| P3 | 2 |
sorry, but where is it?
hiiii
see the attached file