Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count condition

Hi All,

I have a large data table and I'm trying to put together an expression in a LED display chart, but I just can't get it to work!

Two of the fields are Service and Build...

Service          Build

Service A          B

Service B          B

Service B          F

Service C          F

Service D          B

Service D          F

etc.

I need the LED display to show the count of the number of services that have a build of both B and F.

Any help gratefully received! Thanks.

5 Replies
shree909
Partner - Specialist II
Partner - Specialist II

Hi ,

If i understood clearly for  services listbox u want to show the count of B and F  in the same list box

Take services as listbox, then go the properties and expression tab of the listbox and add an expression

=count({<Build ={'B','F'}>}Service)

or try this

=if(match(Build,'B','F'),0,count(Service))

Not applicable
Author

Hi Shree909, Thanks for the reply.

I'm trying to get the number of services that are listed against both the builds - B and F.

But not those that are just B or F.

So, in the small example above, the result should be just 2... Service B and Service D.

Regards

nagaiank
Specialist III
Specialist III

You may use And-Mode listbox. The Qlikview Reference manual explains this in detail.

Not applicable
Author

Thanks Krishnamoorthy.

In the list box I created using the advice from shree909 the And-Mode checkbox is greyed-out.

Also, I'm trying to get just one value returned, displayed as an LED gauge chart (I dont need the service(s) displayed.

nagaiank
Specialist III
Specialist III

The And-Mode checkbox will be available (not greyed-out) when the conditions for such listboxes are met. The conditions are discussed in the Reference Manual.