Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
tamilarasu
Champion
Champion

Bug or My Mistake?

Hi,

I am new to qlikview. I found a weird problem while working on a file. I have used set expression "Count({<Status={'F'}>}Cust)" to display the count of customer where the status is "F". When I tried, I got customer count. But the column is blank. I have tried to load the data from inline, this time the result is correct.  I can use if condition but I want to know why this has occurred.

Capture.PNG

Attached QVW sample file and data.

Thank you.

Kind Regards,

Tamil

15 Replies
hic
Former Employee
Former Employee

The field Status is blank in your data. Maybe you want to use

   Count({<Prod={'F'}>} Cust)

instead?

HIC

anbu1984
Master III
Master III

Count(If(Status='F',Cust))

jagan
Luminary Alumni
Luminary Alumni

Hi Nagaraj,

All your Status field values are null that is why you are not getting values, check whether you are using correct status field?

or you can use

=Count(Cust)

Regards,

Jagan.

tamilarasu
Champion
Champion
Author

Hi Henric,

This is mock data. Field name is correct and the column might be filled with letters like 'F' or 'D'. For example if i enter F in column the output is displayed correctly.

Sometime the column might be blank. In that case, set expression failed to display the result correctly (Showing all customers, but it should not display any results. ). Could you correct me, If I am wrong.

tamilarasu
Champion
Champion
Author

Hi Jagan,

Yes. Sometimes, status field might not filled with any values. If i enter 'F' in column the output is displayed correctly. See above screenshot. If there is no data in column status, it should not display any results right?

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

CustData:

LOAD Sno,

     Cust,

     Prod,

     Alt(Status, '') AS Status,

     [Sold Qty],

     Price

FROM

Sample.xlsx

(ooxml, embedded labels, table is Sheet1);

Now it will show correctly, seems there is issue with field will all Null values from Excel in Set analysis.

Regards,

Jagan.

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Does it have something to do with the fact that count(No Data) returns NULL instead of 0?

tamilarasu
Champion
Champion
Author

Hi Jagan,


I have entered some values manually. This time no values has been uploaded in status filed. The solution which given by anbu chelian is working fine. But my question is whether there is a bug in set analysis or not.? I came across the scenario already. I just want to know, everyone else is facing the same issue.


Hope I clearly explained my doubt!


Thank you for your response.

simenkg
Specialist
Specialist

I believe this came up few months ago as well, and that this was a bug in the way Set Analysis worked on fields with only null()-values.

Found it:
Set modifier problem with empty column