Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Row Deletion

Inactive User
Not applicable

Hi everyone,

How to remove unwanted rows from a data sheet, find sample data below:

 

Name  num

A              1

A               1

A               1

A               2

A               2

A               2

 

How can i remove first 3 row or last 3 row or all rows, can anyone help ?

 

Thanks in advance

15 REPLIES 15
Inactive User
Not applicable

Hi @sbatra116

 

I wanna apply below mention condition

 

City should be same, if it is different then i have to remove all these rows(6).

 

Thanks

DataNath
17 - Castor

@Inactive User when you mention 'City should be the same' - what are you referencing, i.e. same as what? I'm not sure what you're trying to achieve as, in the example you have provided, you say that you should remove all 6 rows, which would leave you with nothing. Surely in your real data of 50,000 rows, you also have different cities, and so if you remove all of them you'll also be left with nothing? Can you provide a little more detail around the logic of the comparison?

Inactive User
Not applicable

Hi Datanath,

 

Thanks for your rply, there may be 2000 or 4000 row matches the given criteria and rest do not match the same criteria, so will retain only those rows who doesnt match criteria and delete rest all.

DataNath
17 - Castor

Is your criteria fixed? Or does it come from another field?

 

If it's fixed, i.e. you just want to keep rows where the target field isn't 'A', then you could just use a filter with:

[Target field] != 'A'

 

Where your 'Target field' is the column you're checking for a match.

 

If it's dynamically coming from another field then you could also use a filter like so:

[Checking field] != [Criteria]

 

Where 'Checking field' is the column you want to check, and 'Criteria' is the field you are comparing it against. As you're using !=, the outcome you're looking for will come out of the top (True) anchor of the filter.

HomesickSurfer
12 - Quasar

@Inactive User 

 

  1. Summarize: Group By: Region, Group By: Category, CountDistinctNonNull_City
  2. Append CountDistinctNonNull_City to input
  3. Fillter:  Custon Filter expression: [CountDistinctNonNull_City ] = 1

HomesickSurfer_0-1655137188791.png

 

sbatra116
8 - Asteroid

@Inactive User 

provide sample data in good format. 

 

Labels