Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to remove garbage rows in this scenario?

Capture.PNG.png

Here we can see name of the cities are repeating...For my scenario the name of the city arising for the first time is valid otherwise consider it as garbage value.Like 'Chak Forty M' is again repeating in 2nd and 3rd row, so here I want only 1st row to be loaded and 2nd & 3rd should avoided or deleted...How to achieve the same???

Thanks in Advance

Regards

Himanshu Kumar

11 Replies
kushalthakral
Creator III
Creator III

Hi Himanshu

Can you share this in excel or share your qvw

Regards

Kushal

Anonymous
Not applicable
Author

Hi Kushal,

I have attached excel sheet.Please find attachment.

kushalthakral
Creator III
Creator III

can you try FirstSortedValue in expression

kushalthakral
Creator III
Creator III

Anonymous
Not applicable
Author

Hi,

How will you remove garbage rows at scripting level????

Not applicable
Author

Hi,

you can use "Group By City1" clause in your load script. with max (Latitude) and max(Longitude).

fernando_tonial
Partner - Specialist
Partner - Specialist

Hi, You try AVG

LOAD

City1,

Avg(Latitude) as Latitude

Avg(Longitude) as Longitude

From Testing.xls

Group By City1;

Best Regards.

Tonial.

Don't Worry, be Qlik.
Anonymous
Not applicable
Author

thanks a lot  Kushal,m_sheraz_alam and Fernando for your efforts....As per my scenario I am using FirstValue function in my expression.

anbu1984
Master III
Master III

If you want first row for each City, try this.

LOAD City1 ,Latitude, Longitude

FROM

(biff, embedded labels)

where City1 <> Previous(City1);