"PromoteAllScalars" is promoting a dynamic filename and I need to prevent this

Guitarmageddon

Board Regular
Joined
Dec 22, 2014
Messages
161
Hello all,

When filtering out some rows of null values, then promoting all scalars in first row to headers, it is also taking my source name column, which I would like to retain for possible future use. Problem is, any time I refresh the query its looking for a source name (i.e. filename 8-8, filename 8-9, etc) and causing an error.

Can I "promote all scalars except one"
or....
Possibly, just nest a rename inside the same "promote all scalars" step which could rename column 0 to simply "source name"?

For example, here is where it is promoting all scalars
1659959186624.png



But then as soon as I refreshed with a later file date, it errors out on the prior date since that's what it was explicitly trying to find in the steps. In this case, I used the "8-9 TST" file as a test for tomorrow. I had originally intended "source name" to be used for the meta data column.
1659959243543.png
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Also, here is the step immediately preceeding, so you can see where the columns come from. All the other columns are usable and static once promoted. I guess I could bite the bullet and just delete the first column here, but that is more of a bandaid than anything
1659959486748.png
 
Upvote 0
Small update, I think this was a simple one, but wanted to share in case some other "intermediate beginner" came along and was stumped.

I just inserted a step immediately after, renaming column zero aka first column, to SOURCE DATE. Referencing column zero versus an explicit name is what did the trick. but if there is a better way to nest this into the large single promote all scalars step, Id love to see that

1659960543451.png
 
Upvote 0

Forum statistics

Threads
1,223,637
Messages
6,173,489
Members
452,515
Latest member
archcalx

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top