Forum Discussion
Get value from other table or database in Power Query Editior
- 1 year ago
Hi Balaji,
Refer the below code to get the parameter value dynamically by retreiving from a SQL Database.
V_Access_Token = Sql.Database("your_server_url", "your_database", [Query="Select MAX(Column) as Value from Table;"]){0}[Value]Please accept this as a solution if this resolves your issue.
Thanks,
Jai 🙂
- Anonymous1 year ago
Hi,
Thanks for the solution Jai-Rathinavel and PhilipTreacy offered, and i want to offer some more information for user to refer to.
hello balaji_it02 , If you have a date column in your accesstoken table, you can filter for the most recent token and apply it. e.g
let Source = Sql.Database(yourserver, yourdatabasename, [Query="SELECT *FROM [table] where [CreatedDate]=(select max([CreatedDate]) from [table])""]), AccessTokens = Source[AccessToken]{0} in AccessTokensBest Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Balaji,
Refer the below code to get the parameter value dynamically by retreiving from a SQL Database.
V_Access_Token = Sql.Database("your_server_url", "your_database", [Query="Select MAX(Column) as Value from Table;"]){0}[Value]
Please accept this as a solution if this resolves your issue.
Thanks,
Jai 🙂