cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

SAP BW Cube Parameter not applying

Hello, 

 

We are just starting to use the SAP BW Connector and having some issues with applies parameters not filtering results. 

 

We are using the SAP BW 2.0 connector. 

 

We first noticed a data paramter was not being applied and getting to many results, then to try something simple we noticed a simple material type parameter was actually being applied. 

 

We set the filter Power Query

 

 

Parameter.png

But still get the full data set, even the M Code shows the Cube. Apply function being used on the parameter but we get the full result set back. It seems like this is an SAP BW issue but when using the Analyzer Plug in tool in Excel and the parameter variable does apply. We have tried differen multiproviders with the same results.

 

let
Source = SapBusinessWarehouse.Cubes("sapbwqas", "00", "100", [Implementation="2.0", BatchSize=100000]),
ZSD_MP03 = Source{[Name="ZSD_MP03"]}[Data],
#"ZSD_MP03/ZSD_MP03_QRY002_P_BI" = ZSD_MP03{[Id="ZSD_MP03/ZSD_MP03_QRY002_P_BI"]}[Data],
#"Added Items" = Cube.Transform(#"ZSD_MP03/ZSD_MP03_QRY002_P_BI",
{
{Cube.ApplyParameter, "[0S_MATTP]", {{"[0MATERIAL__0MATL_TYPE].[DIEN]"}}},
{Cube.AddAndExpandDimensionColumn, "[0MATERIAL__0MATL_TYPE]", {"[0MATERIAL__0MATL_TYPE].[LEVEL01]"}, {"Material Type.Material Type Level 01"}},
{Table.AddColumn, "Material Type.Material Type Level 01.Material Type Level 01.UniqueName", each Cube.AttributeMemberProperty([Material Type.Material Type Level 01], "[MEMBER_UNIQUE_NAME]")},
{Table.AddColumn, "Material Type.Material Type Level 01.Key", each Cube.AttributeMemberProperty([Material Type.Material Type Level 01], "[20MATERIAL__0MATL_TYPE]")},
{Table.AddColumn, "Material Type.Material Type Level 01.Medium Name", each Cube.AttributeMemberProperty([Material Type.Material Type Level 01], "[50MATERIAL__0MATL_TYPE]")}
})
in
#"Added Items"

Tried Loading to see if only applies on load.... but still get the full table.

 

Any ideas to troubleshoot?

5 REPLIES 5
dax
Community Support
Community Support

Hi dice927, 

You said that this don't work in powerbi, if you refresh the data preview wondows when you click "apply", will this work? In addition, if you re-open the desltop and re-connect this database,  will this work? By the way, what is your current version of desktop? You could try to copy the successful M code from Excel in PowerBI to see whether it work or not.

Best Regards,
Zoe Zhi

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

 

Anonymous
Not applicable

Pressing Apply in the query preview does not seems to apply the variable being selected.

 

I am on the Novemeber Release of Power BI

 

I am not using Power Query in Power BI, it is a third party plug in called Analyzer the connects directly to BW not using M Code, so there is no M Code to copy over. 

 

 

Anonymous
Not applicable

Hi All,

 

Has this issue been resolved by anyone ?

 

I am experiencing the exact same results - the Cube.ApplyParameter function does not apply on some of our Bex Queries but does work OK on others.

 

Could it be a setting in Bex Designer that needs to be applied ? 

 

I am on Version: 2.79.5768.1082 64-bit (March 2020)

 

Thanks,

Vladimir

 

 

this worked for me.

build data to pass to variable first.

 

Y = 2022
M = 09

D =01

STD = "["&Y&M&D&"]",

[20220901]


EDT = "["&Y&M&D&"]",

[20220901]


{Cube.ApplyParameter, "[!V000001]",{"[2CHL05K5655I2P086O3I7LPCUPH]."& #"STD"}},
{Cube.ApplyParameter,"[!V000002]",{"[2CKV58XX4OIRD795WKZ19FB7KOE]."& #"EDT"}},

You are awesome! Just encountered the same issue and this totally worked, thank you!

Helpful resources

Announcements
Vote for T-Shirt Design

Power BI T-Shirt Design Challenge 2023

Vote for your favorite t-shirt design now through March 28.

March 2023 Update3

Power BI March 2023 Update

Find out more about the March 2023 update.

March Events 2023A

March 2023 Events

Find out more about the online and in person events happening in March!

Top Solution Authors