Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
ecabanas
Creator II
Creator II

Counting customers in LOAD Script

Hi,

I'm loading the full table of sales, but I want to create another one to know the number of customers per month.

Custaccountcreated_atSalesBOid
C0000011/3/2011PV00160319
C0000027/4/2011PV00160333
C00000231/5/2011PV00160368
C00000031/8/2011PV00160936
C00000216/9/2011PV00161412
C00000219/9/2011PV00161447
C00000220/9/2011PV00161459

 

and this table

Month&YearNumber customers
March-111
April-111
May-111
August-111
Sept-113

 

Thank's for your help

 

 

6 Replies
sunny_talwar

Do you have a MonthYear field screated in the scipt? If you do, then create a straight table like this

Dimension

MonthYear

Expression

Count(DISTINCT Custaccount)
Anil_Babu_Samineni

Perhaps this?

Month(created_at) as Month

And create table with

Dimension : Month

Expression : 

Count(TOTAL <Month> Custaccount)

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
sunny_talwar

@Anil_Babu_Samineni  - Why do you need TOTAL <Month> here? I think there is no point of adding TOTAL <Month> when you only have Month as the dimension.

Anil_Babu_Samineni

@sunny_talwar 

My intention adding TOTAL qualifier is, if customer added another dimension and they need for month based TOTAL count.

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
sunny_talwar

Oh, so you are assuming if another dimension is added... but what if they don't want to see the total after adding another dimension... I don't think it is right to assume that when another dimension is added, it should still total by Month. But if that is needed, then you are right.

ecabanas
Creator II
Creator II
Author

Hi all

 

Sorry, maybe I explained bad....I want this new table in load script, to save it in a qvd and use in another app.

 

Thank's