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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Remove duplicate in Script

I have a script that shows the following data say named : DataList

DataList

LocationIDDATE
7001 6/2/2013
70016/2/2013
70017/2/2013
70018/2/2013
200012/3/2013
30006/2/2013

I need another script that removed the duplicated dates for same locationID and add another column which show number of duplicate for each date so have to be like this

LocationIDDateCountDate
70016/2/20132
70017/2/20131
70018/2/20131
200012/3/20131
30006/2/20131

Please anyone help this is important

1 Solution

Accepted Solutions
rbecher
MVP
MVP

Hi,

you can aggregate into a new table:

Result:

NOCONCATENATE LOAD LocationID, Date, Count(Date) as CountDate

Resident DataList

Group By LocationID, Date;

- Ralf

Data & AI Engineer at Orionbelt.ai - a GenAI Semantic Layer Venture, Inventor of Astrato Engine

View solution in original post

3 Replies
rbecher
MVP
MVP

Hi,

you can aggregate into a new table:

Result:

NOCONCATENATE LOAD LocationID, Date, Count(Date) as CountDate

Resident DataList

Group By LocationID, Date;

- Ralf

Data & AI Engineer at Orionbelt.ai - a GenAI Semantic Layer Venture, Inventor of Astrato Engine
Not applicable
Author

Thanks alot man . Your a life saver

amit_saini
Master III
Master III

Hi,

Please try this:

Task:

NOCONCATENATE LOAD Location, Date, Count(Date) as CountDate

Resident Test

Group By Location, Date;

Where 'Test' is the name where you are calling your table.

Thanks,