Forum Discussion
Dynamic Parameters with SAP BW BEX
- 7 years ago
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" }}},
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" }}},
Hi I dont think the way that you are doing is ever helped you at all, think for a minute if you can easily fetch 2 years of data without any issues, and you somehow define the parameters for start and end date, and you now want to pull data for 6 years, the powerbi serivce will refetch that amount for 6 years and it will throw some errors rather at the PowerBI Service side, or SAP BW Side, for me I dont have any parameters defined, but I am appending 4 months each in my qureies and going upto 3 years and append all those quries into 1 single query and build my report using that, this works for a report in which I am not selecting too much amount of data.
For another report this fails at the SAP BW Side and in powerbi I dont see any errors, but there are several dumps generated at the SAP BW side and those stops the ongoing process.
So how can you say that if I define my start and end date parameters at PowerBI Side this will ever work? For me I am only able to extract 4 months of data, so if you say that I will define my parameters in PowerBI Service and refresh the report for 2 years it will never refresh for me.
Above make any sense to you??
Neither we can choose incremental refresh since its not available for SAP-BW.
- ncbshiva6 years agoAdvocate V
Hi,
For me i have loaded only one year of data in Power Bi desktop. Created the parameters and used them to load 3 years of data in the Power Bi service , which is working fine for me since 8 months.
Initially i tried to load all the 3 years data from SAP BW in the Power BI desktop , but it was failing with some memory issues,
So using parameters to load more data from SAP BW will make sense.
- Anmolgan6 years agoPost Prodigy
So your single query can load 1 year of data into PowerBI, and after that you loaded total of 3 years of data into powerbi service using parameter using that single query? and its working fine every since?
- ncbshiva6 years agoAdvocate V
yes , everything is working fine without any issues.
Moreover i am using Power BI Premium for this.