Remove the last Row while processing
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Friends,
I am having the below scenario. The Last record needs to be removed since that is a Summarized of the Value field. I need to load the data into the database where all the fields are being declared as Key Fields and Nulls are not allowed. Please help me to solve this issue.
S.No | Name | Value | Country |
1 | Mike | 200 | USA |
2 | Jason | 300 | USA |
500 |
Solved! Go to Solution.
- Labels:
- Output
- Transformation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- add record id
- sort desending on record id field
- use "2-" in select record tool
Sort ascending and remove record ID.
Or just fliter out nulls/is empty from column 1.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
1. Use a Filter Tool and in its configuration select basic filter where Name Is Not Empty.
2. If you already know the number of records in your data, you can use Sample Tool as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
To remove the last row, use the sample tool and skip the last 1 record.
http://help.alteryx.com/10.6/index.htm#Sample.htm?Highlight=Sample
Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi MarqueCrew,
I actually have the asme issue but cannot use a record Id because the record changes every mth. Your suggestion re the sample tool would be great but I cannot see anywhere in the tool where you can skip the "Last" number of records. Am i missing something? Tks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Correct the sample tool is missing a Skip Last option.
The CReW macro pack (http://www.chaosreignswithin.com/p/macros.html) has a Skip Last N macro
https://www.linkedin.com/in/adriley/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks Adam, works perfectly - Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks Adam, your macro pack perfectly worked for my case.
I have a question, do you have any macro for parent child relationship where i can find the level of the parent and child and order them (I am currently doing it SQL with CTEs but not successful for the rest of the 50% of my case) I am need of a recursive organic macro for parent and child relationships.
Any leads are highly appreciated.
Thanks again.
BR-Srini
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi
Can you show us how to do that?
According to manual you can skip starting records
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
This seems like a useful feature to bundle in, since files with trailer records are a pretty common concept. Is there any possibility of building this into the standard Sample tool, instead of as a macro?