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: 
Anonymous
Not applicable

How to get the Count Expression for Total available number?

Hello Community,

I am new to Qlik View. I am trying to get the total available number for VC configuration.

But i am not getting the Expreesion...

Example:

I am having toatal num of available sales documents for VC is 2340, with in this 2340 docs VC is available for 2000 sales docs and VC is not availbe for 340 s docs.

So i am trying to get the Total no.of available VC  s.docs(2000)...

Please help me on this how to write the Expression for it.

Thanks

Bhupal

1 Solution

Accepted Solutions
simenkg
Specialist
Specialist

Table:

Load *,

if(VC='YES',1,0) as VCFlag

inline [

Sales Document, VC

1, YES

2, NO

3, YES

4, YES

5, NO

];

View solution in original post

24 Replies
Anonymous
Not applicable
Author

You can simply create a flag for which ever record VC is available and use that in your expression like below.

SUM({<VCAvailableFieldFlag = {"1"}>} Sales)

Hope this helps.

Aadil

Not applicable
Author

Hi Kottala Bhupal,

Plz ellaborate ur fields and also hw u get 2000 as available n 340 as not available.

Regards,

kukzzz....

anbu1984
Master III
Master III

=Count(Total VC)

simenkg
Specialist
Specialist

Count({<VC={*}>} [Sales Documents])

If you create a flag in your load script that checks if VC is availible you can use that to filter the expression.

Load *,

     if(isnull(VC),1,0) as IsVC

from table....;

count({<IsVC={1}>} [Sales Documents])

Anonymous
Not applicable
Author

Hi Aadi,

Can you please let me know how to create a Flag for the records VC is available..

Thanks

Bhupal

Anonymous
Not applicable
Author

Hi Simen Kind,

I did not created any flag in the script as of now.

Can you please let me know how to create the fleg for YES or NO..?

Thanks

Bhupal

Anonymous
Not applicable
Author

Based on your description, considering you have a table where VC detail is available and document names are also there in some field.

in the script

LOAD
VCFieldName,

IF(Len(VCDocumentField) > 0, 1) as VCAvaialbleFieldFlag

FROM *....

Hope this helps.

Aadil

Anonymous
Not applicable
Author

Hi Anbu,

I have writen expression for total VC number.

I need to get the Total availabel VC for sales documents.

for supose VC  availbe num is 8 from total VC number.

So i would like to show

Total availabe VC     Total not availbe VC

         8                                  2

Please let me know how to write the flag for it and how to use the flag for the same.

Thanks

Bhupal

simenkg
Specialist
Specialist

if VC has the value Yes or No, then you already have a flag of sorts.

You could make it into a 1,0 flag by writing in your loadscript:

Load *,

     if(VC='YES',1,0) as VCFlag

from table;

Count({<VC={'YES'}>} [Sales Documents])