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
Anonymous
Not applicable

SAP BW Apply Parameter to Measure

Good afternoon!

 

I am trying to filter my query to only retrieve rows from SAP BW with a measure value greater than 0. For example, if the query originally pulls:

  • 0units|1 red|springfield
  • 2units|1 red|California

I would only want the query to retrieve:

  • 2units|1 red|California

The dataset consists of over 2 million rows therefore the query must limit the data retrieved as opposed to filtering after retrieval. I have copied below the current query from Advanced Editor and bold and underlined the measure that I would want to apply the greater than 0 parameter. I would greatly appreciate support on this!

 

let
    Source = SapBusinessWarehouse.Cubes("Web URL", "___", "___", "__", [Implementation="2.0"]),
    SourceA = Source{[Name="SourceA"]}[Data],
    #"SourceA/SourceA_Transaction" = SourceA{[Id="SourceA/SourceA_Transaction"]}[Data],
    #"Added Items" = Cube.Transform(#"SourceA/SourceA_Transaction",
        {
            {Cube.ApplyParameter, "[YGTHH12]", {{"[0Column1].[1777]", "[0Column1].[1555]"}}},
            {Cube.AddMeasureColumn, "Measure1", "[Measures].[222222222]"},
            {Cube.AddMeasureColumn, "Measure2", "[Measures].[333333333]"},
            {Cube.AddAndExpandDimensionColumn, "[0Column1]", {"[0Column1].[LEVEL01]"}, {"Column1._____ Level 01"}},
            {Cube.AddAndExpandDimensionColumn, "[0Column2]", {"[0Column1].[LEVEL01]"}, {"Column2.___ Level 01"}}
        }),


    in
 _____

 

Thanks,

Tom

 

2 REPLIES 2
fzfz
Frequent Visitor

Hello ,

I have some issue. If anyone has a good idea on how to do this , I would be more than happy 

Thank you 

Hi @Anonymous ,

 

I think you can only filter the SAP BW query if you insert a corresponding MDX statement in the Advanced options.

https://docs.microsoft.com/en-us/power-bi/desktop-sap-bw-connector

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


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.