And it has nothing to do with data pulls, so far as I can tell. This is occuring with a pulled dataset, and I'm simply messing with measures and visuals.
I've been working on a complex report (lots of complex Measures), and Microsoft SQL Server Analysis Services has been opening and eating up my computer's memory, often freezing Power BI.
It appears to start up, or to really get going, when I try to apply a "third tier" Measure (meaning that it is based off of a Measure which is based off of a Measure) to a visual.
Here is the code for the "third tier" Measure:
Grd_Dyn = IF([Scr%_Dyn]>=.9 , "A" , IF(AND([Scr%_Dyn]<.9,[Scr%_Dyn]>=.8) , "B" , IF(AND([Scr%_Dyn]<.8,[Scr%_Dyn]>=.7) , "C" , IF(AND([Scr%_Dyn]<.7,[Scr%_Dyn]>=.6) , "D" , "F" ) ) ) )
Pretty simple code. If you put a hard value in in place of "Scr%_Dyn", you would get an answer back probably in less than milliseconds. But when I try to add this Measure to any visual, the PBI loading wheel gets going, and PBI will often freeze.
Could it be related to the first and second tier Measure? I don't think so becasuse those two work fine and do not slow down my report when I add them to Visuals.
The code for them is far to complex to post here (a total of about 400 lines of Dax code). Suffice to say that "Scr%_Dyn" computes a percentage based off several filters and the values yielded by "m_Dyn", which does some pretty simple math based off of several filters. Here is what one of the Visuals looks like:
What's worse, this process keeps running even when you close PBI, "idling" at a fairly high memory use. I also noticed, when I re-opened PBI to pull that code, that there were now TWO of those processes running , as well as another one, CefSharp.BrowserSubprocess:
Guess where both of these processes live?
C:\Program Files\Microsoft Power BI Desktop\bin\msmdsrv.exe
C:\Program Files\Microsoft Power BI Desktop\bin\CefSharp.BrowserSubprocess.exe
What is the purpose of this process?
Why does it only seem to be a problem when I take the aforedescribed action?
How can there be multiple instances of it running if I only have a single Power BI report open?
I've made some pretty complex reports. Why has this only become an issue now?
I've also noticed that this tends to happen with the Microsoft.Mashup.Container process. I've seen as many as SEVEN mashups running on my machine at a time. I think this is related to data pulls.
@v-chuncz-msft I forgot to mention, now updated in the OP, that I haven't pulled the data for this report in some time; there should be nothing query-related going on. I'm merely messing with some measures and visuals.
Any update on this?
I'm getting memory error issues when trying to create new measures.
Under Power BI desktop SSAS is taking up nearly half of the memory, and there are also about 12 instances of Microsft Mashup Evaluation Container
@JRHans09 Nope. I've mentioned it to several Microsoft support folks. I don't think anyone there knows how those three processes work. Maybe the original devs.
The only solution that I know of is to write your measures smarter; use more efficient code. Learn to use variables, switch statements, the differnces between filtering tables and calculatetables.
The key thing is that EVERY TIME you name a measure, field, or table, PBI calls, and calculates, it again! A simplistic example would be if you wanted to cube a number:
Cube = [number] * [number] * [number]
This code calls [number] three times! This would be slower than:
Cube = VAR num = [number]
RETURN num * num * num
Which only calls it once.
For more, check out my other thread: https://community.powerbi.com/t5/Desktop/Slow-Measures/m-p/440978
And there are a few others like this out there.