Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
amit_saini
Master III
Master III

Call only top1 row from DB help???

Hi Folks,

I'm having below scenario:

I need to calculate sum of Quantity , in text box -O/P is 63 which is wrong , looks to me we are having some extra values added here , but not sure from where they came.

But table is showing me correct sum which is 36.

Issue is until left join of Global_Station table even text box is showing right "36" as O/P , but when I'm calling "Sub_Station" table for LineSection info this o/p becomes 63, looks like some additional values are coming from this table.

Might be if I read only 1 row of Sub_Station table then this issue might fix , but not sure how to do this.

Or

There might be some other issue , which I'm not able to think.

Any suggestions?

Thanks in advance!

Regards,

AS

5 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

I think your join is causing double counting of some values. Rather than joining the table, load it the same way without the Left join statement and let QV association take care of the relationship. Then the value should be correct

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
karthikoffi27se
Creator III
Creator III

Hi Amit,

If you just need load line section field why don't try mapping load.

Many Thanks

Kathik

amit_saini
Master III
Master III
Author

Hi Karthik,

I have tried that too , but same result.

regards,

AS

amit_saini
Master III
Master III
Author

Hi Jonathan,

If I'm calling alone Interruption table your suggestion is working fine , but I need to concatenate this table in last with CAQ and in CAQ table also I'm calling same Sub_Station table.

Concatenate(CAQ)

Load * Resident Interruption;

Drop Table Interruption;

Calling without join is creating sync keys and on layout side filters for LineSection is not working fine.

Any suggestion?

Regards,

Amit

jonathandienst
Partner - Champion III
Partner - Champion III

Not really - your problem is wider than the two tables described in your post. This really a case of some thought into the overall design. And why do you have a Sub_Station1 table?

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein