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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello,
I have a report which should be produced by different users simultaneously for different clients.
the report should be based on temporary tables in SQL that retrieves the relevant data for each user logged in to the application
my goal is to change the source of the component in Power BI using parameter which is contains the user name (from query).
I need to concatenate the username parameter to the end of the table name.
let
Source = Sql.Database("pgwmdb01", "PMS"),
dbo_PBIBalances = Source{[Schema="dbo",Item="PBIBalances"]}[Data],
result = if (UserName="") then dbo_PBIBalances else Text.Combine("PBIBalances",UserName)
in
result
for example:
"PBIBalances" should be replaced by "PBIBalances_Ziva"
I'm not familiar with Power BI coding, but tried to use function text.combine to concatenate the parameter with the table name, but I get an error.
Expression.Error: We cannot convert the value "PBIBalances" to type List.
Please your advice how can I solve this issue or if there is any other way to achieve this.
Thanks,
Hi @Anonymous
This article maybe helpful to solve your problem. For your reference:
Dynamic M query parameters in Power BI Desktop - Power BI | Microsoft Learn
Best regards,
Yadong Fang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 39 | |
| 34 | |
| 29 | |
| 24 |
| User | Count |
|---|---|
| 122 | |
| 111 | |
| 83 | |
| 69 | |
| 68 |