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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.