Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Hope you can help me. In a table i have the mix of items code and item description, the problem is that i have a item code with 2 different descriptions, how can i only have the first item description and not 2.
For example my table looks like this
item code | item description |
133 | conecting cables |
133 | cables |
i only want the first row.
The main problem is when i export the table to an excel file it appears with duplicate values because i have two descriptions for the item code
Thank you!!!
Take a look at @Andrius45 post on LinkedIn from a couple of week back.
https://www.linkedin.com/posts/sarkunelis_qlik-qlikview-qliksense-activity-6625394156317487104-FuKi
In short try this:
LOAD
[item code],
firstvalue([item description]) as [item description]
FROM YourData
GROUP BY [item code];
Alternatively you could create a maping table and use applymap() to solve your problem.
Take a look at @Andrius45 post on LinkedIn from a couple of week back.
https://www.linkedin.com/posts/sarkunelis_qlik-qlikview-qliksense-activity-6625394156317487104-FuKi
In short try this:
LOAD
[item code],
firstvalue([item description]) as [item description]
FROM YourData
GROUP BY [item code];
Alternatively you could create a maping table and use applymap() to solve your problem.
Thank you but when i try to load it it appears to have a an error,
here is my code
Material:
load
material,
firstvalue(description) as description
from file;
when i load it without the firstvlue the load works fine
I missed the GROUP BY in my example. I've updated my previous post.
Thank you!!