Forum

Notifications
Clear all

Maintaining columns added to a sheet that was created from Power Query,

4 Posts
3 Users
0 Reactions
55 Views
(@richards1155)
Posts: 19
Eminent Member
Topic starter
 

Column-added-to-PQ-worksheet.JPGI create a worksheet (A) through Power Query from another outside source, then want to be able add a "status" column to flag and filter rows as "active" or "inactive".

When worksheet (A) is refreshed with added or updated entry information and if the entries row order is rearranged will the "status" column with "active" or "inactive" move with the original data or is it tied to the row?

 

I tried to explain in the attachment, might have made it clear as mud Laugh

Using 365, mostly desktop version

 
Posted : 06/01/2022 1:03 pm
Alan Sidman
(@alansidman)
Posts: 222
Member Moderator
 

Pictures are kind of useless and do not allow us to manipulate data.  Suggest you upload a workbook that can be manipulated and tested with a workable solution.

 
Posted : 06/01/2022 4:51 pm
Anders Sehlstedt
(@sehlsan)
Posts: 968
Prominent Member
 

Hello Doug,

I suppose the status is tied with the name, so the easy way to handle such scenario is to create a table/list containing names of those that are inactive, then import that list to PQ and you set the status in PQ based on that. Of course, those not in the inactive list are active.

Br,
Anders

 
Posted : 07/01/2022 7:36 am
(@richards1155)
Posts: 19
Eminent Member
Topic starter
 

Interesting idea, have to be careful not to get caught in a catch 22 scenario, when I try to automate this.

But you have given me an idea, maybe if I use PQ to create two worksheet, "Selection" worksheet with the 4 columns and a "Status" worksheet with just the "Name" column from the source, then I add the "Status" column.

I then could use PQ to merge the two worksheets by "Name", to a new worksheet which would contain the 5 columns, then use this worksheet to create the "Project" worksheet.

I'll try this and let you know, thanks for your input.

 
Posted : 07/01/2022 10:08 pm
Share: