Skip to main content
Announcements
Qlik Launches Open Lakehouse and advanced agentic AI experience in Qlik Answers! | LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
jalanhart
Creator

Count number of times a field appears in a table

I am trying to create a field in a table where each row shows the total number of times a record appears in a table.

every count formula i can think of and try is giving me a value of 1 and not it's total. 

I can do this in EXCEL by saying countif(A:A, Criteria). How do i do that in QLIK?

jalanhart_0-1730928054672.png

 

Labels (1)
4 Replies
jochem_zw
Employee

Something like:

Count(Total <FRUIT> FRUIT)

jalanhart
Creator
Author

that did not work. there are obviously more columns that this. I've attached an example but they keep showing up as 1 each time. as where I'd like each row to say its total which is 48 in this example. 

I tried count (total <ROLE> ROLE)

 

fabdulazeez
Partner - Creator III

You might need to use count(site) to get the distinct count across the rows.

Qrishna
Master

1. if you want this  view

2491217 - Total Count for all Values (2).PNG

Dim: FRUIT, Measure: Count(Total <FRUIT> FRUIT)

 

2.if you want this view:

2491217 - Total Count for all Values (1).PNG

// Backend Solution:
Data:
Load RecNo() as S.no,*;
LOAD FRUIT
FROM
[F:\Qlik\Qlik View\Comm_Qlik Solutions\2491217 - Total Count for all Values\2491217 - Total Count for all Values.xlsx]
(ooxml, embedded labels, table is Sheet2);

left join(Data)
load FRUIT, count(FRUIT) as Nett
resident Data
group by FRUIT;

//Fron End Solution:
Dim: S.no, Fruit --> Hide S.no
Measure: Count(Total <FRUIT> FRUIT)