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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
GrahamR99
Resolver I
Resolver I

Filter based on Parmeter

Hello

I'm trying to do a basic query, using a Parmeter.

 

I have a Oracle query with results called Retail_Weeks.  I have a Parmeter called Retail_Week.

 

I want to have a new query with just data that matches the Parmeter Retail_Week.

 

I have this code, but it does not work;

let
    Source = (Retail_Weeks,[Query="Select * From Retail_Weeks where RW_WEEK_NUMBER = " & Retail_Week])
   
in
    Source

 

How do I change the code to make this work?

 

Regards

 

GrahamR99

3 REPLIES 3
v-sihou-msft
Microsoft Employee
Microsoft Employee

@GrahamR99

 

You should concatenate the string within Query part. It will be like: 

 

 

let
    Source = (Retail_Weeks,[Query="Select * From Retail_Weeks where RW_WEEK_NUMBER = ' "& Retail_Week&" ' " ])
   
in
    Source

See my sample below:

 

23.PNG

 

11.PNG

 

22.PNG

 

33.PNG

 

Regards,

Hello Simon Hou-MSFT

Is there any more help you can give me please, I still struggling with this problem.

 

Regards

 

GrahamR99

Hi

Thank you for the help, but the code you have given me does not work, it comes up with the error;

Expression.SyntaxError: Token RightParen expected.

 

I don't know what this means, can you help any futher please?

 

Regards

 

GrahamR99

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors