Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

using flags

Hi any help please;

I have a field Customer Names with 8 unique names , each customer is buying N number of products: During the script load i am creating a flag for Customer Count (If (Not IsNull(CustomerName),1,0) as Cust Count.

Now when i am using sum(Customer Count) in the Expression i am getting only 8 where as it should not be the case, as the Count will be more than eight as each unique customer may buy any number of products. Like if X is buying 1,2,3,4,5,6,7,8,9,10 products then sum(Customer Count) should be 10 but i am getting 8 only.

I know its very simple and with a self created example i am getting the right answer but when i am using that in my task it''s not working.

Can any one explain where i am going wrong

1 Reply
swuehl
MVP
MVP

Hard to tell without knowing a little bit about your model and the data.

Could you post a screenshot of your model? And maybe a screenshot of a tablebox showing your count field and the orders?

A sample QVW might help to understand your issue.

Just guessing, but if you are creating the count field in the dimensional table that shows only the 8 customers, a simple Sum(CountField) will return 8. You need to create the field in your fact table if you want to get the order count with a valid customer.