Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
Attached QVW sample file and data.
Thank you.
Kind Regards,
Tamil
The field Status is blank in your data. Maybe you want to use
Count({<Prod={'F'}>} Cust)
instead?
HIC
Count(If(Status='F',Cust))
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.
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.
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?
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.
Does it have something to do with the fact that count(No Data) returns NULL instead of 0?
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.
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.