Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
KirstenKa
Creator II
Creator II

remove duplicate 1 value only in load script

My loadscript looks like this and I would like to remove duplicates for Trading Co only, adding distinct next to load doesn’t work. Don’t know how to remove duplicates for the specific value Trading Co only, how to integrate this in the load script. See also attachment

KirstenKa_2-1689097961529.png

 

KirstenKa_3-1689097961532.png

 

 

 

Labels (1)
17 Replies
KirstenKa
Creator II
Creator II
Author

Thanks I will try this later and let you know. Is "Item" in  my script just a random value, or is "Item" part of the script which I should include?

KirstenKa
Creator II
Creator II
Author

Thanks will try this later. Do you mean I need to remove all the values I upload in this script? -> I need those values in my data

tealowk
Partner - Contributor III
Partner - Contributor III

Yes, it means to remove all the other lines from this specific load statement in the script.

Load distinct loads unique records only, so if you have the same Trading Co with two different quantities, it is loaded twice.

If you need the other values afterwards in your visualisation, you could create a mapping table which assigns a Trading Co to every item number. 

But maybe you don’t need to remove the duplicates at all? 

KirstenKa
Creator II
Creator II
Author

Thanks I will try when I start working on it again. Is "Item" part of the script or just a random value from my data?

KirstenKa
Creator II
Creator II
Author

Thanks I will try when I start working on it. Do you mean I need to remove the other data values in my data file? Because I do need these values as well

KirstenKa
Creator II
Creator II
Author

Thanks @MarcoWedel , the script doesn't take it as soon as I close the bracket from [Trading co]  And I still need to have my Trading Co value in there -> "where not exists" does that remove the complete column Trading Co?

KirstenKa_0-1689961287495.png

 

KirstenKa
Creator II
Creator II
Author

 

Thank @tealowk 

It doesn't take it when I add the datasource 

KirstenKa_2-1689961570193.png

 

KirstenKa
Creator II
Creator II
Author

How can I create a mapping table  which assigns a trading co to every number