Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
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
techvarun
Specialist II
Specialist II
Author

is there any possibility to do the same in straight table because I need the output in the format which i have mentioned in the image above.

And I need to show some different titles also for eg: for AU I need  to show audit etc

Regards

techvarun
Specialist II
Specialist II
Author

Count(status) for DBA will give me the result as 2 is there any way to set an expression like

count of DBA where Status = AU or something like that?

Regards

tresesco
MVP
MVP

You can. PFA.

But it is always recommended to do the mapping in the script and keep id dynamic.

Not applicable

Hi,

Create a pivot table with date, name, status as dimensions and Count(status) as expression.

And then drag the status column to horizontal (as Header).

Hope it helps.

Not applicable

Hi

find the attached doc

it gives correct data.

Date Name Status =count(Name)
22-Aug-12DBAAU1
CU1
DPRAU1
BU1
DU1
ABCAU1
CU1
MNBAU1
CU1
BU1
DU3
Not applicable

Hello

When having a lot of data, it is a best practice to create a field in your table :

1 AS Used_For_Count.

Then you only need to SUM instead of COUNT, which Qlikview does much quicker!

And it can be used anywhere . Only drawback : no count distinct with this.

Hub