Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Strange Chart Behavior

I'm loading three columns into a report, the first is a [Company Number], the second is an [Order Number] and the third is the number of days it takes to deliver the order called [Delivery]. 

I created a chart with Company Number, Delivery and then the following expression to count orders delivered the same day:

IF(Delivery=0, Count(Distinct [Order Number])

When I export to Excel there are 79 rows but if I remove the Delivery column because the expression is already counting records where Delivery = 0  so the column isn't required there are only 9 rows exported.  Finally if I select the value 0 from Delivery the row count goes back to 79 again.

I have attached the QVW and would appreciate help in figuring what is going on here.

Thanks

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Try as expresssion

=count(DISTINCT if(Delivery=0, [Order Number]))

otherwise you only get a count for Companies with an unambiguous answer to the Delivery numbers.

View solution in original post

2 Replies
swuehl
MVP
MVP

Try as expresssion

=count(DISTINCT if(Delivery=0, [Order Number]))

otherwise you only get a count for Companies with an unambiguous answer to the Delivery numbers.

Anonymous
Not applicable
Author

Thanks Swehl,  I wouldn't have thought of that, maybe it's too late in the day but I can go home now.