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
tigels
Frequent 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
Employee
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
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.