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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Loading tables twice to get two different counts?

Hello,
I have two tables - Parts and Main. I want to get a count(oid) - all orders as well as the count(oid) for orders with status = 'Complete'.
I need to create a bar chart to show the following calculation per month and year.
"count(oid) / count(oid) where status = 'Complete'"

i.e. Total # of orders divided by Total number of orders with status complete

Is there an easy way to do this? I tried the following way but this is resulting in a lot of synthetic keys.

Parts_Combo1 :
LOAD PNo,
PName, ptype;
SQL SELECT PNo,
PName, ptype from Parts;

LEFT JOIN
SQL SELECT oid,
PNo, Ship_date, status
from Main;

Parts_Combo2:
LOAD PNo,
PName, ptype;
SQL SELECT PNo,
PName, ptype from Parts;

LEFT JOIN SQL SELECT oid,
PNo, Ship_date, status
from Main where status = 'Complete';

Please help.

Labels (1)
0 Replies