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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
masplin
Impactful Individual
Impactful Individual

Issue with surprising slow calculation

Hi. Having an issue with what i thought was a very simple table refreshing online that works fine in desktop

 

The table has 6 measures and performance analyzer sase over 9000ms for theDAX query.  If I delete the last measure the time drops to 4000ms

 

 

Capture.JPG

 

The measure that makes the differnece is simply his which just adds the 2 measures already calculated together.   I can't see why this would double the time, but maybe it starts from zero for each measure? Is there any way to cache the results so the sum is much quicker? 

 

Associate Gross Billing = IF([Total Associate Net Billing]+[Total Associate VAT]=0,BLANK(), [Total Associate Net Billing]+[Total Associate VAT])

 

I'm guessing fundamentally the issue is that for these calculations I am taking the name of an associate and having to filter multiple tables for that name anda date range to calculate various sub-measures that eventually get summed up. Sadly the data for each associate is on different tables for each task they do.  There are probably 8 tables queries for each line so is there a way to create a table of all the components and sum them without repeating the exercise for each measure,. 

 

for example

Total Associate Net Billing = IF([Activity Associate Cost]+[Event Associate Costs]+[Associate Exp Cost]=0,BLANK(),[Activity Associate Cost]+[Event Associate Costs]+[Associate Exp Cost])

but

Activity Associate Cost = [Activity Associate Del Cost]+[Activity Associate Exp Cost]

and

Activity Associate Del Cost = CALCULATE( SUM(Support_Package_Items[Associate Delivery Cost]),
                                    FILTER(Support_Package_Items, RELATED(Associates[Test])="N"),
                                        USERELATIONSHIP(DateTable[Date],Support_Package_Items[Start Date]))

 

so the 3 measures summed to get net each has 2 components and each has a similar calculate function

 

I can see now there is a lot of filtering going on to create the peices at the bottom of the tree and it has ot perform that to get both the net then again to get the gross. 

 

Any tips on how to reduce the repetition?  Do I need to move the componets up into VAR withih nthe higher measures instead of it being combiniation of multiple layers of measures. 

2 REPLIES 2
amitchandak
Super User
Super User

@masplin , change these two measure like this and check if there is any improvement

 

Associate Gross Billing = [Total Associate Net Billing]+[Total Associate VAT] +0

Total Associate Net Billing = [Activity Associate Cost]+[Event Associate Costs]+[Associate Exp Cost] +0

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
masplin
Impactful Individual
Impactful Individual

still 9700ms

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors