Forum

Self referencing qu...
 
Notifications
Clear all

Self referencing queries with data validation

5 Posts
2 Users
0 Reactions
62 Views
(@baxbax)
Posts: 125
Estimable Member
Topic starter
 

Hi,

I have a refreshable query that I then need to manually add some comments to but maintain the link between the source data and the manual comments whenever the query is refreshed.

I found a great solution to this in the forum:

https://www.myonlinetraininghub.com/excel-forum/power-query/self-referencing-queries

However I have a little bit of a twist that I can't work out a solution for. The "comments" field in my scenario is actually derived from a data validated list of valid options. So I want the user to query the original data and then pick a comment from the list. However if I use the self referencing solution as demonstrated in the post linked to above the data validation is removed when the query is refreshed.

Does anyone know if it is possible to achieve what I need with the self referencing method. If not then do you have any alternative suggestions.

Thanks as always.

 

Bax

 
Posted : 14/10/2021 10:39 am
(@mynda)
Posts: 4761
Member Admin
 

Hi Bax,

Instead of putting your comments field in the Power Query table, or any table for that matter. Put it in a column beside the table, then define a name for the whole range you want to import to Power Query that contains your comments. So, instead of getting the data from the table, you'll get the data from the named range.

Hope that works out.

Mynda

 
Posted : 14/10/2021 7:14 pm
(@baxbax)
Posts: 125
Estimable Member
Topic starter
 

Hi Mynda,

How would I tie the comments to the relevant line in the table. If the table is refreshed then the line position may change if the data source has been updated and I need to ensure that the comment follows the line if previously was referring to.

Thanks

 

Bax

 
Posted : 15/10/2021 7:37 am
(@mynda)
Posts: 4761
Member Admin
 

The second table with the comments should not be connected to a query. It should simply be a list of the ID numbers and your comments which you then import and merge with the main table.

 
Posted : 15/10/2021 8:21 am
(@baxbax)
Posts: 125
Estimable Member
Topic starter
 

Ok so I would need to pick up the ID numbers from the source table and ensure it is in the comments table. I will give it a go.

 

Thanks

 

Bax

 
Posted : 15/10/2021 8:47 am
Share: