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
ncbshiva
Advocate V
Advocate V

Dynamic Parameters with SAP BW BEX

Hi Team,

 

I am using the SAP BW for connecting the data. I have 6 years of data . Initially i am pulling only 2 years of data into Power Bi desktop, so that i wont get any memory issues when i try to load all the 6 years of data.

 

And Fiscal Year is a variable in SAP Bex and below is the power quey code for the same with 2 years filtered.

 

{Cube.ApplyParameter, "[0S_FYEAR]", {{"[0FISCYEAR].[K22017]", "[0FISCYEAR].[K22018]"}}},

 

Now i want to create a parameter in Power BI and use that same in my Power Query.

So that i can publish the pbix file with 2 years of data in online and change the parameter value for all the six years , so that it will refresh in online without any issues.

 

Please let me know how to achieve this solution.

 

Thanks in advance.

1 ACCEPTED SOLUTION

I was able to achieve this solution with help of some blogs.

 

Below is the example on how to pass the parameters in the SAP BW query.

 

First you need to define your parameter , in my case it was Fiscal Year

 

#"GetParameterValue" = "[" & (Fiscal_year) & "]",

 

Then you need to use the above parameter in the cubeApplyParameter query as shown below.

 

{Cube.ApplyParameter, "[0S_FYEAR]", {{"[0FISCYEAR]." & #"GetParameterValue", "[0FISCYEAR]." & #"GetParameterValue" }}},

 

 

View solution in original post

19 REPLIES 19

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.