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
tigels
Regular Visitor

GroupBY/Summarize Performance

I have follow DAX to remove duplicate data in my fact table (I've tried these two ways):

 

Dedup_Qt = SumX(AddColumns(Summarize(Table;Table[keyOfMyTable]);"Total";Calculate(Sum(Table[qt]));"Count";Calculate(COUNTA(Table[keyOfMyTable])));DIVIDE([Total];[Count]))

 

Dedup_Qt = SumX(GroupBy(Table;Table[keyOfMyTable];"Total";SumX(CurrentGroup();Table[qt]);"Count";COUNTX(CurrentGroup();Table[keyOfMyTable]));DIVIDE([Total];[Count]))

 

My table has about 100 millions of rows.

 

My key can duplicate of many ways (one row in two, three, four..), and one filter on my report can change it (it was three and is just two now), so I need to remove it dinamically.

 

I need to improve the performance of these DAX. I always get memory error.

 

"You have reached the maximum allowable memory allocation for your tier".

 

Are there other way to do it?

2 REPLIES 2
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @tigels,

 

Could you please mark the proper answers as solutions?

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Seward12533
Solution Sage
Solution Sage

The SUMX's are killing you. Your best bet is to remove the duplicates in the query editor before it gets loaded into PowerBI.

 

snip_20180815230243.png

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