Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
techvarun
Specialist II
Specialist II

Count with a condition

Hi folks

I have a doubt in displaying the count from an excel sheet

I have an excel sheet with 3 fields

DateName Status
22-Aug-12DBAAU
22-Aug-12DBACU
22-Aug-12DPRAU
22-Aug-12DPRBU
22-Aug-12DPRDU
22-Aug-12ABCAU
22-Aug-12ABCCU
22-Aug-12MNBDU
22-Aug-12MNBAU
22-Aug-12MNBCU
22-Aug-12MNBDU
22-Aug-12MNBBU
22-Aug-12MNBDU

if i set a expression to count the number of entries for a Name DBA it is showing the count as 2 and its correct

But i need to find the count of entries based on status also for

eg : for DBA and AU the count is 1

and for MNB and DU count is 3


Regards

15 Replies
michael_maeuser
Partner Ambassador
Partner Ambassador

see attached, but i´m not sure if this is what you want.

techvarun
Specialist II
Specialist II
Author

Sorry Michael

Currently am working from a Personal Edition QlikView

if possible please paste the expression here.


Regards

tresesco
MVP
MVP

Can you please tell the output format you want?

Not applicable

Hi Please check the output  suggested by - this is what you want

pp1.PNG.png

techvarun
Specialist II
Specialist II
Author

Hi tresesco

This is my expected format

Regards

sushil353
Master II
Master II

Hi,

Use a pivot table and use expression as

=aggr(Count(Status), Name, Status)

Please find attached

HTH

Sushil

kangaroomac
Partner - Creator II
Partner - Creator II

What you could do, is in your load script:

LOAD

     Date, Name, Status

     , Name & ' - '  & Status AS yourField....

Now in your front end, you can do a count on the created field, i.e. Count(yourField) should give you a count of unique joins for Name and Status.

Hope this helps.

tresesco
MVP
MVP

Hello Bakshi,

If the dimension members(Name, Status) are there in the pivot table, aggr() function would not be required, only Count() would be enogh. Isn't it?

tresesco
MVP
MVP

PFA