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
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
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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