Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Creating Parameter for dataset

Hey, I am trying to create a Client parameter in my dataset, that when you change the client name on the parameter, all the tables update to only have the data for that client.  I created a server parameter and a client parameter. so P_Server & P_Client. Below is the query.

 

 

let
Source = Sql.Database(""&P_Server&"", "DW_Target", [Query="select *#(lf)from Table.Table#(lf)WHERE [Client]="&P_Client&""])



in
Source

 

 

However I keep getting the following error:

 

DataSource.Error: Microsoft SQL: Incorrect syntax near the keyword 'from'.
Details:
Message=Incorrect syntax near the keyword 'from'.
ErrorCode=-2146232060
Number=156
Class=15

1 ACCEPTED SOLUTION
v-yanjiang-msft
Community Support
Community Support

Hi @Anonymous ,

According to your description, it's a SQL statement error, you use

SELECT column1, column2, ...
FROM table_name
WHERE condition 

statement in the below formula,

select *#(lf)from Table.Table#(lf)WHERE [Client]="&P_Client&"

Is *#(lf) your column name and Table.Table#(lf) your table name? I guess you just want to select all columns from the #(lf) table, you can modify the statement to 

select * from #(lf) WHERE Client ='&P_Client&'

More reference about the SELECTFROMWHERE statement: SQL WHERE Clause

SQL SELECT Statement

 

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yanjiang-msft
Community Support
Community Support

Hi @Anonymous ,

Is your problem solved?? If so, Would you mind accept the helpful replies as solutions? Then we are able to close the thread. More people who have the same requirement will find the solution quickly and benefit here. Thank you.

Best Regards,
Community Support Team _ kalyj

v-yanjiang-msft
Community Support
Community Support

Hi @Anonymous ,

According to your description, it's a SQL statement error, you use

SELECT column1, column2, ...
FROM table_name
WHERE condition 

statement in the below formula,

select *#(lf)from Table.Table#(lf)WHERE [Client]="&P_Client&"

Is *#(lf) your column name and Table.Table#(lf) your table name? I guess you just want to select all columns from the #(lf) table, you can modify the statement to 

select * from #(lf) WHERE Client ='&P_Client&'

More reference about the SELECTFROMWHERE statement: SQL WHERE Clause

SQL SELECT Statement

 

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors