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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
raji
Regular Visitor

user parameter in dynamic query

Hello!

 

I'm trying to pass the value of a parameter to my dynamic query statement so that I can limit the dataset on the source db (dealing with extremely large data).

 

I tried the following... but it doesn't transfer the value of parameter StartDate to variable p_start_date.  How can I get the parameter value passed so I can use it in my dynamic query?

 

 let
p_start_date = fnGetParameter("StartDate"),
Source = SapHana.Database("server",
[Query="select ""VBAK"".""VBELN"", ""VBAK"".""AUART"" #(lf)from ""VBAK"" #(lf)where ""VBAK"".""ERDAT"" > '& p_start_date &'"])
in
Source

 

 

Many thanks!!

10 REPLIES 10

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.