Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi All,
Need some help with Parameters in Power BI Desktop. Parameters works perfectly for me with the server and database, but I need the schema as well, please help.
How do I do a parameter on the schema? It doesn't work when I put the parameter inside the schema.
let
Source = Sql.Database(Server, Database),
dbo__addresses = Source{[Schema="dbo",Item="parameterTest"]}[Data]
Server and Database working great. ParameterTest no good.
Solved! Go to Solution.
In your parameter you refer to query Accounts and in your previous post I see a query Accounts in which the parameter is used.
That is most probably causing the cyclic reference error.
The query referenced in your parameter should be a query that just creates a list of valid entries you can choose from, not the query in which the parameter is used.
should parameterTest be in quotes?
Neither with or without quotes works.
My suggestion would be to share all relevant information required to help you.
Any screen shots of the relevant table entries at the source step, the value and definition of you parameter, anything else that might be relevant.
I will illustrate below.
In my opinion it should work without the quotes.
This works with me (but I don't have a sql database).
let Source = #table(type table[Schema = text, Item = text, Data = text],{{"dbo","Item1","Data1"},{"dbo","Item2","Data2"}}), dbo__addresses = Source{[Schema="dbo",Item=parameterTest]}[Data] in dbo__addresses
Table at the Source step:
Query Item (for the list with valid parameter values):
let Source = #table(type table[Schema = text, Item = text],{{"dbo","Item1"},{"dbo","Item2"}}), Item1 = Source[Item] in Item1
parameterTest:
lync0056,
Ah, your parameter is named Username? That might be a reserved keyword. And, yes, parameters should not be in quotes.
Fred
Tried ClientUsername and same error
In your parameter you refer to query Accounts and in your previous post I see a query Accounts in which the parameter is used.
That is most probably causing the cyclic reference error.
The query referenced in your parameter should be a query that just creates a list of valid entries you can choose from, not the query in which the parameter is used.
All working now, thank you very much.
User | Count |
---|---|
93 | |
84 | |
78 | |
75 | |
66 |
User | Count |
---|---|
115 | |
105 | |
93 | |
65 | |
60 |