Forum Discussion

MegaOctane1's avatar
MegaOctane1
Helper I
3 years ago

SAP Power BI run same query with different years as parameter

How can i run the same query as "paginated" with different parameters? If i run it for too many years, it returns an error from SAP BW about memory issues. 

 

Below is a partial code from the query. I provide a parameter as "0CALYEAR" 2023

How can i run this query with year as parameter and then get the data for multiple year in the same query?

 

let
    Source = SapBusinessWarehouse.Cubes("HIDDEN", "HIDDEN", "HIDDEN", "HIDDEN", [Implementation="2.0", LanguageCode="EN"]),
    GFIARM03 = Source{[Name="GFIARM03"]}[Data],
    #"GFIARM03/GFIAR_M03_Q0003" = GFIARM03{[Id="GFIARM03/GFIAR_M03_Q0003"]}[Data],
    #"Added Items" = Cube.Transform(#"GFIARM03/GFIAR_M03_Q0003",
        {
           {Cube.ApplyParameter, "[!V000001]", {{"[0CALYEAR].[2023]"}}

 

 

I have looked at  this blog, but he doesn't specify how he managed to do it, and the comments also show that others are struggling with the same.

https://businessintelligist.com/2018/03/24/how-to-overcome-sap-bw-memory-overflow-issue/

No RepliesBe the first to reply