Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
GrowingBUG99
Contributor II
Contributor II

Need to remove the duplicate values

GrowingBUG99_0-1751436763017.png

Need to remove the duplicate values from the from this rows where i only want the values of NPD FAI and remove the values customer design problem whose section is customer ,here is the sample code 

Rejection_Details:

LOAD Distinct
PR_Item_Name as Item_Name ,
PR_Match_Code as "Match_Code",
Left((PR_Match_Code),3) as TI,
PR_Weight as Rejection_Weight,
PR_Datamatrix as Datamatrix,
Prod_Order,
PR_Step as Step,
PR_Routing as Routing,
PR_Serial_No as Serial_No,
PR_Qty,PR_Dept as Dept,

If(WildMatch(PR_Dept,'LEAK'),'7) CNC-PLT (PLT)',
If(WildMatch(PR_Dept,'MACH','Quality','PNT'),'3) Machining (MR))) as area
FROM [lib://Qlik/Qlik_PIRM.qvd]
(qvd) Where PR_Scrap = '1'  and  Year (PR_ende) >=2020;

Here is the sample code

 

Labels (5)
2 Replies
seanbruton

Hi,

 

This could be a solution but is a bit of a wild idea. 

Try Concat on the column, afterwards on a preceding load with a distinct again replace the string concat with the new value, or Customer with null. To make it easy maybe create a flag for the records which are concat, then drop it afterwards.

Regards 

Chanty4u
MVP
MVP

Add this condition in where clause 

(

    PR_Reason = 'NPD FAI' OR

    NOT (PR_Section = 'Customer' AND PR_Reason = 'Customer Design Problem')

 

)