Forum Discussion
PowerBIFin
4 years agoAdvocate I
Power BI Dataflow: Passing Parameter in SQL Statement
I have the following script which works in the Power BI Desktop but not in the Power BI Dataflow.( Error: We could not evaluate this query due to invalid or missing credentials. ) The referenced tab...
- 4 years ago
I finally made it work after going through the Global and Project Options (Dataflow > Options).
I have to enable "Allow Combining data from multiple sources." and "Always allow parameterization in data source and transformation dialogs".
ā
lbendlin
4 years agoSuper User
I think you are missing some quotes.
let
Code = Table.FirstValue(Table.SelectColumns(#"SharepointTable", {"PCode"})),
Source = Sql.Database("server", "db", [Query = "select * from [Fact].[Table] where PCode IN ('"& Code & "')"])
in
Source