H
hpatino
I have a MS-QUERY that retrieves 4 columns from an SQL server. I want to create a fith column that is evaluated as formula in excel, not in the SQL server
The fith column should compare column 4 with the value on an excel function (in this case percentile):
=if(column4 > percentile(sheet1!ReferenceName, 0.25), 1, 0 )
I have two options
- Create a manual formula everytime the data is refreshed from the server
- Using vba to trap the Query AfterRefresh event, then get a range of the fifth column and update every cell formula
However, i want to know if is posible to create a retrieve data using MS-query that is only evaluated in excel and not treated as string nor evaluated in the SQL server. Something like this
Select col1, col2, col3, col4, '=if(col4>percentile(param1, 0.25),1,0)' from Table
The fith column should compare column 4 with the value on an excel function (in this case percentile):
=if(column4 > percentile(sheet1!ReferenceName, 0.25), 1, 0 )
I have two options
- Create a manual formula everytime the data is refreshed from the server
- Using vba to trap the Query AfterRefresh event, then get a range of the fifth column and update every cell formula
However, i want to know if is posible to create a retrieve data using MS-query that is only evaluated in excel and not treated as string nor evaluated in the SQL server. Something like this
Select col1, col2, col3, col4, '=if(col4>percentile(param1, 0.25),1,0)' from Table