The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi Community,
I am tryting to change Schema name and server name dynamically for my direct query statements(using SAP HANA)
using parameter i am able to get dynamic servername but still struggling to change Schema name in all queries at once. Please see screenshot here:
What i have is multiple queries like this:
SELECT * FROM "Schema1"."Function1"();
SELECT * FROM "Schema1"."Function2"();
SELECT * FROM "Schema1"."Function3"();
what I want is all query change my schema name
SELECT * FROM "Schema2"."Function1"();
SELECT * FROM "Schema2"."Function2"();
SELECT * FROM "Schema2"."Function3"();
Since i have lots of queries in singel file i dont want to open each and every query and change schema name in query editor for each one.
My real problem is moving a powerbi report from UAT to Production back and forth.
Thanks, in advance
This article shows how to do it: https://www.excelguru.ca/blog/2016/04/28/pass-parameters-to-sql-queries/
and this as well: https://blog.crossjoin.co.uk/2016/12/11/passing-parameters-to-sql-queries-with-value-nativequery-in-...
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries