Extract the last 7 columns

Hi

I would like to extract the last 7 columns of an invoice file that we receive each month. The issue I have is that the number of columns prior to the last 7 will not always be the same (i.e. the August file had 184 columns but the October file only had 124 columns).

Is there a way that this could be done?

Thanks
Chris

Hi
if you transpose your data add a new row id to get the column names into one column you could then sort them descending and then take the first 7. These could be then later used with reference column filter to get the last 7 from your original table
br

2 Likes

Hi @Daniel_Weikert

I have created the following reference table based on your suggested process above:

image

However, when I connect it to the reference column filter node it returns an empty table. Where am I going wrong?

Thanks
Chris

Hi @fostc80857

You need to transpose the table again so that they are all back into individual columns.

Start point


Filtered columns
image
Transpose
image
Reference Row Filter output
image

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.