Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Can you please post some examples of how removing duplicates for only one field would look like?
Hi @MarcoWedel see attachment
@KirstenKa you can use firstsortedvalue function based on date if you have date field
https://help.qlik.com/en-US/sense/May2023/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/BasicAggre...
Hello, @KirstenKa
You Can try By doing Group By,
Eg.
Load *,
Resident [Table Name]
Group by "Trading Co", "Item Id";
If This Helpful for You Please mark Answer as solution!
Hi Kristen,
if you use
Load distinct "Trading Co" from MySource;
this will result in a table containing only unique "Trading Co" values.
I don't know how you want to analyse the data afterwards and thus don't understand why duplicate values of the "Trading Co" field do matter. Could you please provide some further details?
Kind regards,
Thilo
Thanks @tealowk
It doesn't work in my script, also tried "mysource" between brackets and "Distinct" right before Trading Co. See also attachment
Ok thanks I need to look into it and try
maybe like this?
table1:
LOAD [Trading code],
Item
FROM [https://community.qlik.com/cyjdu72974/attachments/cyjdu72974/new-to-qlik-sense/233798/1/Remove%20duplicates%20based%20on%201%20value.xlsx] (ooxml, embedded labels, table is Sheet1)
Where not Exists([Trading code]);
You need to replace MySource by your actual source and remove all the other fields that you load in the table.