Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Count

I Have two columns

A          B                         C

1          passed          passed

1        passed          ready

i want count of passed and ready for service id's (i.e column a)

i want logic if column B is passed and Column C is passed then consider as passed

but  if column B is passed and Column C is ready then consider as ready

Please help

10 Replies
MVP
MVP

Re: Count

=Count(If(B='passed' and C='passed' , A))

Note: Use of distinct keyword is upto your requirement.

Not applicable

Re: Count

but if passed and ready combination i need to consider ready

lukaspuschner
Contributor

Re: Count

if(B='passed' and C='passed','passed','ready')

Not applicable

Re: Count

ok thanks..but i have also combination like

passed     not active

passed     in-use

Whenever both b and c is passed then i need passed but if i have and any combination with passed i need to use other part not passed  

ravic906
Contributor III

Re: Count

Heyya,check this..!!

MVP
MVP

Re: Count

Hi,

Try like this

Passed Count:

=Count({<B={'passed'},C={'passed'}>} A)


Ready Count:

=Count({<B={'passed'},C={'ready'}>} A)


Regards,

Jagan.

Not applicable

Re: Count

PFA,

hope it will help......

ravic906
Contributor III

Re: Count

Considering the details that u have provided later, I prepared this

have a look at it.

rupe
Valued Contributor

Re: Count

This sounds as though you need to create a Status Flag/Field on load to provide any of the results that you need that will also be flexible:

if(B = 'Passed',

     C,

     'Failed'

) as Status,

You can then count the number Passed, Failed or any other stsus that you like very easily and simply

Hope this helps

Community Browser