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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
AmBigsPBI
Frequent Visitor

How to sum a value which is repeated in the data set based on ID, without adding up each line?

AmBigsPBI_0-1700075486896.png

 

Hello, I provided a sample data set above to display the problem I am having. My data set has IDs, originated $ amounts, originated dates, payment amounts, and payment dates. Because the payment dates happen every month, the remaining fields are all multiplied. I am trying to only sum the originated $ amount based on ID rather than every line in the column associated with the ID. I have tried many variations of SumX, Calculate, Filter, AllExcept, etc and they all seem to be off.

 

Additionally, I want this to filter the sum by the originated date.

 

The below gets me closer to a number that makes sense for what I'm expecting, but still seems too high. More-so, the filter on the originated date isn't working properly. Given I chose today's date, it should show $0 but isn't. 

 

Method 1:

Calculate(SUMX(values(ID),Calculate(min(OriginatedAmt)),Originated Date>11/14/2023),sumx(values(ID))
 
Method 2:
Sumx(filter(Table,Originated Date.[Date] > date(2022,11,13)),min(OriginatedAmt))
 
Thanks!
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@AmBigsPBI , Try measures like

Add or remove columns from summarize as per need


Sumx(SUMMARIZE(Table, Table[ID], Table[Original Date], Table[Payment]), [Payment])


Sumx(SUMMARIZE(filter(Table, Table[Originated Date]> Date(2023,11,14)), Table[ID], Table[Original Date], Table[Payment]), [Payment])

 

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@AmBigsPBI , Try measures like

Add or remove columns from summarize as per need


Sumx(SUMMARIZE(Table, Table[ID], Table[Original Date], Table[Payment]), [Payment])


Sumx(SUMMARIZE(filter(Table, Table[Originated Date]> Date(2023,11,14)), Table[ID], Table[Original Date], Table[Payment]), [Payment])

 

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

You hit the nail on the head with the summarize function. I had never had the opportunity to use that yet so I wasn't familiar. You got the fields mixed up a bit but I got the gist. Thanks!

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors