Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Some of the REST API calls I make require that I use an API key (that has a short time to live). I can call the query to get a new API key easily enough, but is there any way to save that key so that the other queries can use it? I thought maybe putting it into a parameter that the other queries would then use but I cannot see a way to do that (even tried the new dynamic parameter preview but was unable to get that to work)
Hi @Anonymous
The dynamic parameter preview feature is only supported for some DirectQuery data sources. It cannot be applied in your scenario.
As you can call the query to get a new API key, you can try using a query to get the key first and transforming the query to only return the key result (usually it is a text string). Then transform this query into a custom function. The result of the custom function is the key. In other queries, use this function to replace key string. As a result, when other queries need a key, they will call the custom function to query the key and get the result.
Here is an example which queries an access_token in a query and uses it in other queries then. The logic is similar. Have a try!
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
You can only use variables inside a query/partition. Beware of the formula firewall monster.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 10 | |
| 9 | |
| 6 | |
| 5 | |
| 3 |