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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
gillyr7
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
ibarrau
Super User
Super User

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


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

Anonymous
Not applicable

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors