Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Find missing order

Hi!

I have a table with fields looks like this:

Customer (Customer number)

Active (Yes or No)

Date

Order (Ordernumber)

I have put these in a chart like the one shown below.

DateCustomerActiveOrder
2014-01-01123456Yes1
2014-01-01234567Yes1
2014-02-01123456Yes2
2014-02-01234567Yes
2014-03-01123456Yes

What I would like to do is to have a listbox with the available dates, select a date and the customers active at this date with no orders placed (field blanked in example above) to be shown.

9 Replies
morgankejerhag
Partner - Creator III
Partner - Creator III

Hi Henrik,

You can have an expression that looks for the missing orders. Something like

sum(if(Order='',1,0))

Just beware that the logical test might need to be different depending on how the data is read from the source. It could be 0, blank, null or something else.

If the data set is really big it will be better to do the if-statement (without sum) in the script. Then the expression only needs to be sum(MissingOrderFlag) which will be quicker than performing a if-statement for each line in the data.

See the attached example.

Best regards,

Morgan Kejerhag

Senior Business Intelligence Consultant

Drake Communication AB, Sweden

Not applicable
Author

Thank you!

I will try this, Im a bit unsure about the source if the field of customer is blank also when the order number is empty.

Best regards!

morgankejerhag
Partner - Creator III
Partner - Creator III

Hello again,

If you have a more traditional setup with Customers in one tab and Orders in another you can do it a little bit different. See the attached example.

MarcoWedel

Hi,

one solution could be:

QlikCommunity_Thread_142289_Pic1.JPG.jpg

QlikCommunity_Thread_142289_Pic2.JPG.jpg

QlikCommunity_Thread_142289_Pic5.JPG.jpg

QlikCommunity_Thread_142289_Pic3.JPG.jpg

QlikCommunity_Thread_142289_Pic4.JPG.jpg

hope this helps

regards

Marco

Not applicable
Author

To get it to work with the source, first I need to see which customers are active at the specific date and then find out which of theese are missing orders.

I guess it has to be done with a join?

morgankejerhag
Partner - Creator III
Partner - Creator III

It depends on the data structure. Could you attach a file or send it to me privately?

maxgro
MVP
MVP

another one

1.png

Not applicable
Author

The source for the data is two tables, one with the fields customernumber and status (active yes or no), and the other table with the fields customernumber, ordernumber, date of the order.

What I want is to select a date and see which customers are active and have an order for this date, and which customers do not.

morgankejerhag
Partner - Creator III
Partner - Creator III

It is often tricky to show "what is not there".

There might be a more elegant solution to it, but attached is a version that prepares the information in the script. You could improve it by removing the synthetic key.

In the script we generate lines for each date for each customer - so now there is data selected when we click a date. For each such line we check if it should be a hit (Active, Date >= RegDate and no orderNo).