Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

counting word occurence

Hello,

I'm having trouble counting occurence of words in a colum.

This is what I have:

CUSTOMERPRODUCT
CUSTOMER 1PRODUCT 1
CUSTOMER2PRODUCT 3
CUSTOMER 3PRODUCT 2
CUSTOMER 4PRODUCT 3
CUSTOMER 5PRODUCT 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:

PRODUCTOCCURENCE
PRODUCT 11
PRODUCT 22
PRODUCT 32

Thanks a lot

3 Replies
Not applicable
Author

HI

SEE ATTACHEMENT

TAKE PIVOTE TABLE

DIMENSION-       PRODUCT

EXPRESSION -        COUNT(PRODUCT)

then output like this

PRODUCTCount(PRODUCT)
P11
P22
P32

*********************************************************************************************

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--

PRODUCTOCCURENCE
P11
P22
P32
Not applicable
Author

sorry, but where is it?

er_mohit
Master II
Master II

hiiii

see the attached file