Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
shannoypaul
Creator
Creator

Occurrence Count of Column Data

I have two tables Master and Detail.

I have to find the number of occurrences of data Company in IceCream data.

for e.g Occurrence of Amul is 2 and Occurrence of Kwality is 2.

5 Replies
its_anandrjs
Champion III
Champion III

Load your table like

Master:

Load * Inline

[

  Company, Location

  Kwality, Mumbai

  Amul, Bangalore

];

Left Join

Detail:

Load * Inline

[

  IceCream, Location

  Sundae Kwality, Mumbai

  Cone Kwality, Mumbai

  Cornetto Amul, Bangalore

  Family Pack Amul, Bangalore

];

Noconcatenate

Final:

LOAD

Location&'_'&Company&'_'&IceCream as Key,

IceCream,

Location,

Company

Resident Master;

DROP Table Master;

And on Straight chart take

Dimension:- Company

Expression:- Count(Location) //as Occurance as label

shannoypaul
Creator
Creator
Author

If we remove the location column, lets suppose we have only one column in one table

alexandros17
Partner - Champion III
Partner - Champion III

Here it is

its_anandrjs
Champion III
Champion III

Then there is no relation between the tables and if there is only one column then count its frequency of occurrence.

its_anandrjs
Champion III
Champion III

I think you asking about if there is only one single columns and there are 4 values and each has 2 occurrence if i am right then see the example for that.

LOAD *,RecNo( ) AS Rowid;

LOAD * Inline[

City

Mumbai

Mumbai

Banglore

Banglore

];

In the above table i have 4 values and each has 2 occurrence then we count its rowcount as a frequency

in straight Dimension:-City and expression :- Count(Rowid)

Regards