Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
sculptorlv
Creator III
Creator III

Doubled rows :(

Hello guys (and ladies)

I spen a few hours and can't find the reason, why my rows becomes doubled (actully x4) after adding RecNo function.

Primary I have the table:

1.jpg

Then, I add the Help table and add funciotn RecNo

Code.jpg

As the result, I have to much dublicated rows:

result.jpg

I hope, You can help me find the reason..

Or you can help me to REMOVE these dublicates

1 Solution

Accepted Solutions
sunny_talwar

I believe the RecNo() is creating the sequence of number before DISTINCT kicks in.... May be do DISTINCT and then in the next load do RecNo()

Temp:

LOAD DISTINCT

   Team_Code_2,

   Achive_Total_Team_2

Resident HELP_TABLE

Order By Achive_Total_Team_2 desc, Team_Code_2;

FinalTable:

LOAD RecNo() as NPK_Team_2,

   *

Resident Temp;

DROP Table Temp;

View solution in original post

2 Replies
sunny_talwar

I believe the RecNo() is creating the sequence of number before DISTINCT kicks in.... May be do DISTINCT and then in the next load do RecNo()

Temp:

LOAD DISTINCT

   Team_Code_2,

   Achive_Total_Team_2

Resident HELP_TABLE

Order By Achive_Total_Team_2 desc, Team_Code_2;

FinalTable:

LOAD RecNo() as NPK_Team_2,

   *

Resident Temp;

DROP Table Temp;

sculptorlv
Creator III
Creator III
Author

Thank you..