SOLVED

Sorting problem with imported data from query

Copper Contributor

Hello!

 

I have difficulties sorting the data in Excel. In the attached picture, there are 2 columns to the left and 2 to the right. 

The ones to the left are imported via a query from an SQL server. 

The ones to the right are with formulas inserted by me. 

 

The problem: I cannot sort the data set based on the results from the formulas. 

Example: To sort the whole data set based on "Time Left" column. 

 

I would like to sort the dataset based on the results of the formulas, but still have the query active and downloading data when refreshed. 

I know that I could convert the whole query range, but this is not what I want. The data needs to be updated continuously. 

 

Hope that I managed to explain the problem as clearly as possible. 

Thank you in advance for your help!

 

Best regards, 

Denis

5 Replies
best response confirmed by DenisL (Copper Contributor)
Solution

@DenisL 

Table returned by Power Query and manually added columns are not synced. You may link them by some field, if exists, e.g. Task ID. Or move your calculations into Power Query - it looks like column Time Left could be added within Power Query and returned to Excel together with main table.

Hello Sergei!

 

Thank you for the answer.

I do have a column to use as linkage. I am just not sure how to do that. Do you have a tutoria link at hand that I could maybe use? 

 

I will try the 2nd solution as well and see how far I can get with it.

Thanks again!

@DenisL 

Second option with Power Query is much more preferable. If with ID you may add values from one table into another using INDEX/MATCH or VLOOKUP based on ID.

@Sergei Baklan 

The 2nd solution works amazingly! Thank you! I have almost finished my whole data set.

@DenisL , you are welcome

1 best response

Accepted Solutions
best response confirmed by DenisL (Copper Contributor)
Solution

@DenisL 

Table returned by Power Query and manually added columns are not synced. You may link them by some field, if exists, e.g. Task ID. Or move your calculations into Power Query - it looks like column Time Left could be added within Power Query and returned to Excel together with main table.

View solution in original post