Reply
avatar user
Anonymous
Not applicable

How summarize, SUMMARIZECOLUMNS or ADDCOLUMNS function sum up a column value on summarize table

Hi,

I'm a little bit confused about how these summarize functions work.

I got this table

EraDon_1-1702379830602.png

I tried to summarize the table with comm_desc and get total saleFinaced_amt because SaleFinaced_amt is repeating the value for each record.

 

Finance sale = ADDCOLUMNS(SUMMARIZECOLUMNS(sale_finance_comm[SaleID], sale_finance_comm[SaleFinanced_amt], "FinanceSaleAmt",SUM(sale_finance_comm[SaleFinanced_amt])),"SaleFinanceAmt",CALCULATE(SUM(sale_finance_comm[SaleFinanced_amt])))
EraDon_0-1702379599836.png

As you can see, it always adds up all repeating values. I don't understand why it summing all values rather than only summarized rows.

Could someone explain to me this and how can I achieve this, please?

 

Kind Regards

Era

 
3 REPLIES 3
Fowmy
Super User
Super User

@Anonymous 

When you summarize by sale_finance_comm[SaleID] and  sale_finance_comm[SaleFinanced_amt], it found two records and added to gather and you got the total of 49,000. What is your requirement here? 

I did not get why you tried to summarize your table bya value field here. Please let me know what you are trying to achieve.

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

avatar user
Anonymous
Not applicable

Hi Fowmy,

Thanks for the reply. Now, I understand how the sum work with summarize.

I tried to write a measure to get salesfinance_amt to show with each comm_amt in a table

my measure is SUMX(ADDCOLUMNS(SUMMARIZECOLUMNS(sale_finance_comm[SaleID]sale_finance_comm[SaleFinanced_amt]),'SaleFinanceAmt',CALCULATE(SUM(sale_finance_co

mm[SaleFinanced_amt])), [SaleFinanceAmt])

 

I can get the correct comm_amt for each column but SaleFinaceAmt gives a total of two rows.

I need the table below

SaleID   Finance Comms  Originate Fee  Sale Finance amount   
269241788.221227.2724500.00

Hope this will explain my requirements to you. Maybe I missed some concepts here.

 

Kind Regards

Era

 

@Anonymous 

Please share some sample data in Excel along with the expected results. Do you need a table or a measure or both, plase specify. Attach your file as a link after saving in Google Srive or One Drive.

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

avatar user

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

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

March2025 Carousel

Fabric Community Update - March 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)