Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
kushalthakral
Contributor III

Count of fields

Hi All

i have a following requirement below

 

CampaignCustomerYears with CompanyCount
A189
A289
A389
A489
A589
A689
A789
A889
A889

i need to calculate the count of customers and display in a separate column

as in the case above it is 9 which includes duplicate also need to consider that also

Can any one help me on this

Thanks

Kushal

5 Replies
MVP
MVP

Re: Count of fields

Table:

LOAD Campaign, Customer, Years

FROM...;

JOIN

LOAD Count(Customer) as Count

RESIDENT Table;

MVP
MVP

Re: Count of fields

If you are not looking for a script solution, you would need to define the exact context in which you want to create the column.

Again, it's much easier to help if you create and post a small sample QVW.

Regards,

Stefan

MVP
MVP

Re: Count of fields

you can try with TOTAL in a chart

count(TOTAL Customer)

or by Campaign   

count(TOTAL <Campaign> Customer)

1.png

Partner
Partner

Re: Count of fields

Hi Kushal,

PFA

Try this

1.JPG

You also try this way,

2.JPG

kushalthakral
Contributor III

Re: Count of fields

Hi All

i have solved this by using below formula

Sum(Total<[Years with Company],[Campaign Name]>Aggr(Count(Total<T>distinct T),[Campaign Name],T))