Hi Everyone,
Trying to use a power query to pull data from multiple tables in a database based on a single excel cell.
The current query i have is below.
= Odbc.Query.....
"SELECT#(lf) curr_wgt.VALUE_DT#(lf),SM.BROAD_CATEGORY_GROUP#(lf),SUM(curr_wgt.CURRENT_WEIGHT) AS `ASSET_CLASS_WEIGHT`#(lf)
FROM#(lf)DB.`pfc.fact_portfolio_current_wgt` curr_wgt#(lf)INNER JOIN DB.`pfc.dim_SM` SM#(lf)ON curr_wgt.SECURITY_ID = SM.SECURITY_ID#(lf)
WHERE curr_wgt.PORTFOLIO_ID = 'PORT1'#(lf)
GROUP BY#(lf) curr_wgt.VALUE_DT#(lf),SM.BROAD_CATEGORY_GROUP")
As you can see i have a static Where function to pull data based on a portfolio_ID of PORT1 i want to be able to add a list into an excel cell (A2) so that when i choose a portfolio ID it automatically loads the data for that specific Portfolio.
The other thing is the data is to big for all portfolios to be able to bring in all the data.
Thanks in advance.
Bookmarks