Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
PetrP
Frequent Visitor

Incremental Refresh with Analysis Services source

Hi Everyone,

 

just I am trying to set-up Power BI incremental feature on report where the source is Azure Analysis Services.

 

But I have problem that I need to filter Cube Dimension (f.e. YearMonth). In general, all dimensions comes from Analysis Services are imported as String. Of course, my idea was filter Cube Dimension member by Integer (YearMonth is greater than an parameter value returned from function), but this is not possible because dimension is imported as String. Bad way is change YearMonth datatype in next Step in M query, because I loose the Query Folding funcion that asked to source (Native Query). 

 

Is it possible to achieve an incremental query to Analysis Services source?

 

As you probably know, you can change datatype in MDX (with StrToValue function, f.e. StrToValue([Calendar].[YearMonth].CURRENTMEMBER.MEMBER_CAPTION)), but this is not applicable for me.

 

Also I tried to use incremental setup in PBI with this M query, but not with success:

 

 

let
    Source = AnalysisServices.Databases("asazure://westeurope.asazure.windows.net/****", [TypedMeasureColumns=true, Implementation="2.0"]),
    Cube = Source{[Name="***"]}[Data],
    #"Model1" = Cube{[Id="Model"]}[Data],
    #"Model2" = #"Model1"{[Id="Model"]}[Data],
    #"Added Items" = Cube.Transform(#"Model2",
        {
            {Cube.AddAndExpandDimensionColumn, "[Calendar]", {"[Calendar].[YearMonth].[YearMonth]"}, {"YearMonth"}},
            {Cube.AddMeasureColumn, "Sum_of_Cost", "[Measures].[Sum_of_Cost]"}
        }),
    #"Filter YearMonth by Function" = Table.SelectRows(#"Added Items", each List.Contains(fx_DateRangeToYearMonths(RangeStart,RangeEnd),[YearMonth])),
in
    #"Filter YearMonth by Function"
	
	
(rangeStartParam as datetime, rangeEndParam as datetime) =>  
    List.Generate( () => [ a = Date.StartOfMonth(rangeStartParam), b = rangeEndParam ], 
    each [a] <= [b], 
    each [ a = Date.AddMonths( [a], 1 ), b = [b]], 
    each Number.ToText(Date.Year([a]))&Text.PadStart(Number.ToText(Date.Month([a])),2,"0") )

 

 

 Does anyone experience how to incrementally refresh PBI from Analysis Services Source?

Thanks a lot for any ideas.

4 REPLIES 4
parry2k
Super User
Super User

@PetrP not sure why are you using import method with Analysis Service, why not use the live connection. What is the point of having AS and using import? Seems to be a strange setup.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

I agree. I have a very similar setup: Analysis Services Tabular models running on premise and connected via the Gateway. 

 

In this setup, no data goes 'across the wire' until someone tries to render a page. Then Power BI will issue the query to the source SSAS Tabular model, and only the needed result rows, properly aggregated, get returned.

 

If you have Azure Analysis Services, you are already paying Microsoft for the memory allocation there. Why also bog down Power BI with extra data? 

 

Hopefully your data model is robust in its relationships, etc.

@PetrP I think you are missing the fundamentals here If you want, we can connect and discuss it over the team meetings/goto meeting, whatever works for you. 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

PetrP
Frequent Visitor

@parry2k  data from AAS are modeled into an understand needs for using by report contributor. Behind the AAS model there are many sources with many diferent keys and must be "translated" to using. Of course, you can acheive that by using other techniques, but the benefits for that is using dimensions and calculated mesures on the "client/contriburo" side.

 

If you mentioned Live connection - there are probably the same problem - you cannot use it for incremental refresh. Or am I wrong? 

 

Keep in mind that data in one query return f.e. 1M rows, because at each refresh must be queried all data from AAS.

 

I will be glad if you explain me a little more about that.

 

Thanks a lot!

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.