Forum Discussion
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
- PetrPFrequent 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!
- ToddChittSuper User
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.