cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
gillyr7 Frequent Visitor
Frequent Visitor

Measure Causing Everything to Freeze - WIll not calculate

Weighted 2 = CALCULATE(SUMX(FLIST,FLIST[Weighted]*FLIST[GCommunityIndex])/[GCommunityIndex],ALLEXCEPT(FLIST,FLIST[Group Claims.AffiliationLevel_II],FLIST[Code]))
 
This measure is casuing my Power BI desktop file to freeze and will not calculate, even after waiting 10+ minutes. It is using other measures (Weighted, and GcommunityIndex) which I think might be causing the problem, however, those measures load very quickly when I add them to their own visual. I am trying to create a weighted average of the 'Weighted' measure while grouping by the Affiliation Level II and Code fields. Does anyone know why this might be causing my file to fail, or any solutions that might be better?
2 REPLIES 2
Super User
Super User

Re: Measure Causing Everything to Freeze - WIll not calculate

If you're iterating a fact table, then beware of such things. You're doing a context transition on probably 100's of rows or more. Hence your problems. You should first understand well how DAX works and only then try to write measures. Good advice, mate.

 

Grab a book on DAX (best one but very technical is "The Ultimate Guide to DAX" by The Italians) and read upon context transition and how NOT TO WRITE DAX.

 

Best

Darek

ibarrau Established Member
Established Member

Re: Measure Causing Everything to Freeze - WIll not calculate

Hi. You can avoid iteration and improve this if you bring the SUMX expresion calculated as a Column (power query or before engine):

(FLIST[Weighted] * FLIST[GCommunityIndex])

From there you can create the measure without SUMX that is iteration a probably big table.

 

Regards

Helpful resources

Announcements
Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Power BI Helps Homeless and Trouble Youth

Power BI Helps Homeless and Trouble Youth

We spoke with Power BI Super User, Greg Deckler, about his charity work

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Users Online
Currently online: 118 members 1,825 guests
Please welcome our newest community members: