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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
REIX
Contributor II
Contributor II

REMOVE DUPLICATED BASED ON DIFFERENT ROWS

How do i write a qvd to remove duplicates , UNIQUE_ID  is unique , and SALE_ID and other values are duplicated forexample the highlighted STORE B , want to retrieve only one row using QVD.

REIX_4-1709119463162.png

 

 

Labels (2)
1 Reply
LRuCelver
Partner - Creator III
Partner - Creator III

Group by all fields that have been duplicated and use an aggregation function (such as FirstValue) for the others:

Data:
NoConcatenate Load
	STORE,
    AGENT_ID,
    FirstValue(UNIQUE_ID) as UNIQUE_ID,
    NUMBER,
    LOCATION,
    Date,
    Month,
    AMOUNT,
    TYPE
From [...]
Group By
	STORE,
    AGENT_ID,
    NUMBER,
    LOCATION,
    Date,
    Month,
    AMOUNT,
    TYPE
;