Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count occurrence in a straight table

Hello All,

I want to create a straight table with the following data :

Input:

Cust_id

101

101

101

102

103

103

103

104

Output:

Cust_id     Frequency of Cust_id               Number_of_custid_with_freq    

101                3                                                  1

101                3                                                   1

101                3                                                    1

102                 1                                                   2

103                 4                                                    1

103                  4                                                    1

103                  4                                                     1

103                   4                                                     1

104                   1                                                      2

Explaination of desired output :

I want to create two fields : 1. Frequency of cust_id which counts how many times cust_id occurs.

                                        2. Number_of_cust_id_with_freq : I want to calculate number of cust_id with similar calculated frequency.

                                             eg. two customers : 102 and 104 have frequency =1.

Can someone please help!

thanks in advance,

Deepika

1 Reply
Anil_Babu_Samineni

May be first one this?

Create straight table

Dimensions are = Cust_id, ValueLoop(1,4)

Expression = if(ValueLoop(1,4)<=count(Cust_id),count(Cust_id))

Then hide calc. dim from presentation Tab. You will reach that.

Second one, May be i didn't follow you. Can you describe more on second part / Question

-- I am assumption, You may have 2 cust_id for those Id's then use Count(Expression)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful