Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
Highlighted
Not applicable

One of my fields isn't joined correctly

The setup:

I have three tables: Projects, PurchaseOrders and ChangeOrders.

http://i46.tinypic.com/qrlma8.jpg

Within Projects, I have ProjectNumber and CurrentPM.  CurrentPM (project manager) contains values like PM 1, PM 2, ... etc.

Within ChangeOrders, I have ProjectNumber and CONo (the change orders number).

What I want:

I want to get a distinct count of CONo (Count (DISTINCT CONo)) and display them among CurrentPM.

The problem:  It doesn't seem like the tables are joined correctly.  I am not getting a count of CONo among different PM's, rather I'm only getting a TOTAL count at the end.

http://i49.tinypic.com/ld6yf.jpg

PONumber seems to be working correctly.

What am I doing wrong?

Tags (2)
1 Solution

Accepted Solutions
nagaiank
Valued Contributor III

Re: One of my fields isn't joined correctly

Try the following:

 

1. Get the count of CONo from the ChangeOrders table

 

Temp1:

load ProjectNumber, Count(CONo) as CONoCount

resident ChangeOrders group by ProjectNumber;

 

2. Add the CONoCount field to Projects table by left join

 

Left Join (Porjects) load * resident Temp1;

Drop table Temp1;

 

You can now display ProjectNumber, CurrentProjectNumber and CONOCount in a table.

View solution in original post

2 Replies
nagaiank
Valued Contributor III

Re: One of my fields isn't joined correctly

Try the following:

 

1. Get the count of CONo from the ChangeOrders table

 

Temp1:

load ProjectNumber, Count(CONo) as CONoCount

resident ChangeOrders group by ProjectNumber;

 

2. Add the CONoCount field to Projects table by left join

 

Left Join (Porjects) load * resident Temp1;

Drop table Temp1;

 

You can now display ProjectNumber, CurrentProjectNumber and CONOCount in a table.

View solution in original post

Not applicable

Re: One of my fields isn't joined correctly

Thank you.  Exactly what I wanted.