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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
PshemekFLK
Helper IV
Helper IV

Turning nested SUMX into SUMMARIZE

Following this article: Nested SUMX or DAX Query? - P3 Adaptive I'm trying to turn nested SUMX formula into CALCULATE (SUMMARIZE) to improve performance

 

Nested SUMX (works correctly but extremely slow):

=SUMX( VALUES(dim_customer[id]),

                SUMX(VALUES(dim_product[id])),

                           [Plan])

 

SUMMARIZE:

=CALCULATE([Plan],

                      SUMMARIZE(fct_plan,dim_customer[id],dim_product[id])))

 

The problem is that the second formula gives me error:

The column 'dim_product[id]' specified in the 'SUMMARIZE' function was not found in the input table

 

I assume this is becuase fct_plan is connected to dim_product using bridge table on higher level than product[id] which is indeed not found in the fct_plan table:

 

summarize.png

Any way to adjust the SUMMARIZE formula to still be able to group by product[id]?

2 REPLIES 2
tamerj1
Super User
Super User

Hi @PshemekFLK 

There is no relationship whatsoever between the customer id and the product id. SUMMARIZE won't help here. The only table that can relate both is the CROSSJOIN which basically would be the same as nested SUMX. Consider also that SUMX is a very well optimized function. 

v-chenwuz-msft
Community Support
Community Support

Hi @PshemekFLK ,

 

You should make sure the 'fct_plan" be the many side of these tables. So that it can get the value it needs.

Or you can try something like this:

=CALCULATE([Plan],

                      FILTER(fct_plan,fct_plan[customerID] in values(dim_customer[id])),

                      FILTER(fct_plan,fct_plan[productID] in values(dim_product[id]))))

 

If you need more help, please share your pbix file without sensitive data and expect output.

 

Best Regards

Community Support Team _ chenwu zhu

 

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

Helpful resources

Announcements
November Fabric Update Carousel

Fabric Monthly Update - November 2025

Check out the November 2025 Fabric 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.

Users online (27)