Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

SAP BW App Server - Variable not passed back to Server

Dear Power BI Community,

 

we've been struggling to set up a Power BI - SAP Connection for weeks now, always running into new issues.

The newest one is the following:

To reduce the amount of data to be extracted, the SAP admin has defined a variable (Load Date) that has to be passed, so not all dates will be loaded into the PBI data model.

 

However, no matter what we try, the SAP server always returns the full dataset, although I have cleary chosen the data to be restricted. Please find below a screenshot and the M Code behind it.

Has anyone of you had such a problem and was able to solve it?

Best regards from Germany!

 

 

 

 

let
    Source = SapBusinessWarehouse.Cubes("XXX", "XX", "XXX", [Implementation="2.0"]),
    PC1S1M = Source{[Name="PC1S1M"]}[Data],
    #"PC1S1M/N1S0_PC1S1M_001" = PC1S1M{[Id="PC1S1M/N1S0_PC1S1M_001"]}[Data],
    #"Added Items" = Cube.Transform(#"PC1S1M/N1S0_PC1S1M_001",
        {
            {Cube.ApplyParameter, "[0I_DAYS]", {"[4PC1S1M-LOAD_DATE].[20200420]", "[4PC1S1M-LOAD_DATE].[20200423]"}},
            {Cube.AddAndExpandDimensionColumn, "[4PC1S1M-LOAD_DATE]", {"[4PC1S1M-LOAD_DATE].[LEVEL01]"}, {"LOAD_DATE.LOAD_DATE Stufe 01"}},
            {Table.AddColumn, "LOAD_DATE.LOAD_DATE Stufe 01.LOAD_DATE Stufe 01.UniqueName", each Cube.AttributeMemberProperty([LOAD_DATE.LOAD_DATE Stufe 01], "[MEMBER_UNIQUE_NAME]")}
        })
in
    #"Added Items"

 

 

 

2 Replies

  • v-juanli-msft's avatar
    v-juanli-msft
    Community Support

    Hi Anonymous 

    Firstly, please update power bi desktop to the lastest version,

    You could write queries in this statement.

    Or apply query as below:

    If problem is still here, please let me the version of your power bi desktop and sap bw, type of the "Load_Date sufte", so that i will reproduce this on my side and find the solution.

     

    Best Regards
    Maggie
    Community Support Team _ Maggie Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks for your answer, v-juanli-msft 

       

       

      DATS 8".

       

      And I'm using Power BI June 2020 Version.


      Thanks a lot in advance!