Forum

No way to transpose...
 
Notifications
Clear all

No way to transpose every 'n' rows of a single column file in PQ?

5 Posts
3 Users
0 Reactions
150 Views
(@td99)
Posts: 22
Eminent Member
Topic starter
 

I have an output that puts the (15) data fields in sequential order, repeating every 15 rows in a single column. I can't find a way for PQ to handle this and am rather surprised as this is not an uncommon problem. I can do it via an index formula in excel but would prefer the once done - always works automatically PQ approach. Is this possible, am I missing/overlooking something?

 
Posted : 30/12/2020 5:17 pm
(@catalinb)
Posts: 1937
Member Admin
 

Hi Trevor,

You have to be more precise, "I can't find a way for PQ to handle this[..]" is not saying anything about the structure of the desired output.

Please clarify.

 
Posted : 31/12/2020 5:45 am
(@td99)
Posts: 22
Eminent Member
Topic starter
 

Yes, sorry, the 15 repeating data items need to be transposed to a row of 15 columns to create a usable data table. See attached file.

 
Posted : 31/12/2020 10:49 am
(@debaser)
Posts: 836
Member Moderator
 

You could add an Index column starting at 1. Then add a calculated column using the index column thus:

 

Number.Mod([Index]-1,15)+1)

 

which will return numbers 1 - 15 repeatedly, then pivot on this new column.

 
Posted : 31/12/2020 11:00 am
(@td99)
Posts: 22
Eminent Member
Topic starter
 

Velouria, many thanks for that! 

 
Posted : 02/01/2021 2:29 pm
Share: