Forum Discussion
parameter in advanced editor query sql
- 7 years ago
Anonymous Not able to replicate the error. Tried the same and working fine. Please post any error that you are facing after changing the table name in the parameter (which is Company Name in your case).
Hej
in my advanced editor i have this sql
let
Source = Sql.Database(SQLServerName, DatabaseName),
#"dbo_CRONUS JetCorp UK$Customer" = Source{[Schema="dbo",Item="CRONUS JetCorp UK$Customer"]}[Data]
in
#"dbo_CRONUS JetCorp UK$Customer"
so i have created a parameter, and my end result should look something like this
let
Source = Sql.Database(SQLServerName, DatabaseName),
#"dbo_CRONUS JetCorp UK$Customer" = Source{[Schema="dbo",Item=(#"Company Name")&"Customer"]}[Data]
in
#"dbo_CRONUS JetCorp UK$Customer"
so i dont need to tell power bi everytime what company the table comes from, but that this is a parameter, and then the tabels name??
i dont seem to find any answers when googleling this, hope you guys can help.