Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Dear all,
I am facing problem while passing one parameter value to API URL on Advanced query editior.
Access_token is dynamic value which we are getting from SQL database everytime.
I want to pass that dynamic value to API URL for getting API Data.
When i manually assign value to variable, it working, but i want this value to picked from sql database every time this dashboard refresh.
Solved! Go to Solution.
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 🙂
Proud to be a Super User! | |
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
AccessTokens
Best 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,
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
AccessTokens
Best 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 🙂
Proud to be a Super User! | |
Create a query to get the dynamic token and then call it putting the result in V_Access_Token?
V_Access_Token = Query_to_get_Token
regards
Phil
Proud to be a Super User!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
14 | |
13 | |
12 | |
12 | |
12 |