Alteryx Designer Desktop Discussions

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

I have to create a dataset based on number of column

Sshasnk
8 - Asteroid

I have a dataset where I have to pick the once where number of columns matches with the first row column rest should be ignored 

 

Example

 

Fund accountamountpurchasesellbuy
ABC12348956258456
NLM1544563145423
BC14556223156489
      
Fund accountamountpurchasesellbuy
ABC1456789456254623
GHL48145562345
      
Fund accountamountpurchasesellbuy
HLK154623123515 
      
Fund accountamount   
LMN145789   

 

1. the First row has 6 columns and so as 6th row

2. While the last-second record does not have the same number of columns as the first row so we don't have to pick

 

Output:

 

Fund accountamountpurchasesellbuy
ABC12348956258456
NLM1544563145423
BC14556223156489
ABC1456789456254623
GHL48145562345
HLK154623123515 
1 REPLY 1
wdavis
Alteryx
Alteryx

Hi @Sshasnk 

 

I've attached a workflow which should help with this, you might want to tweak to your exact requirements.

 

  • Transpose data so it's all in columns, you can the do a count of the number of fields that aren't blank
  • You can then set a filter to the number of fields should contain data (I've set this to 6)
    • This might need to be updated to 5 if you want to include the 'HLK' fund as it's missing data for 'Buy'
  • Use the Cross-Tab to re-format to tabular format
  • Final steps are to format table and clean up

Hopefully this makes sense and works for you!

Will

Labels