cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Super User VII
Super User VII

Re: Incremental Refresh with Analysis Services source

@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.






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.





Highlighted
Frequent Visitor

Re: Incremental Refresh with Analysis Services source

@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!

Highlighted
Responsive Resident
Responsive Resident

Re: Incremental Refresh with Analysis Services source

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.

Highlighted
Super User VII
Super User VII

Re: Incremental Refresh with Analysis Services source

@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. 






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.





Helpful resources

Announcements
Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Don't miss the Power BI Dev Camp this week!

August Community Highlights

Check out a full recap of the month!

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.

Top Kudoed Authors