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

Reply
Anonymous
Not applicable

Finding first sum over 100

Hello All,

 

I have a Contributions table that has columns: AssetGroup, GiftAmount, FundID, and ID (gifts)

 

I need to find the sum of the first ID (gift) that is over $100 to a fund.

 

In our business the first ID (gift) to a FundID is usually a place holder and the following ID (gift) is what gets the FundID going. Our objective is to find out what the sum of that first (real) gift is. 

 

Would it be possible to set the $100 cutoff as a slicer so that the users could change the parameter? If not, it's not pertinent.

 

Please let me know if I need to elaborate or give another example

1 ACCEPTED SOLUTION

@Anonymous oh i thought you need id, just change the measure

 

First Id = 
CALCULATE( [Gift Amount],  
TOPN(1, FILTER( Table, [Gift Amount] > [Parameter Value] ), [Gift Amount], ASC )
)


Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

6 REPLIES 6
parry2k
Super User
Super User

@Anonymous try following measures, update column and table name as per your model.

 

Add what-if parameter and then it will be dynamic as it will give first fund id where amount is greater than parameter value.

 

Gift Amount = SUM( Table[Gift Amount] )

First Id = 
CALCULATE( MIN( Table[First Id], 
TOPN(1, FILTER( Table, [Gift Amount] > [Parameter Value] ), [Gift Amount], ASC )
)


Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

So I created a column to calculate the sum of Gift Amount.

 

How are you calling "First Id" within the "First Id" column creation? It hasn't been created yet...

 

"First Id = CALCULATE(MIN(Table[First Id..." 

 

Just to reiterate, I need to find the first Gift Amount > $100 for each FundID

@Anonymous it is a typo, change it to fundid and make sure you are adding these as measures, not columns



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

I changed it to FundID and First ID is now just showing me the FundID, not an actual amount

@Anonymous oh i thought you need id, just change the measure

 

First Id = 
CALCULATE( [Gift Amount],  
TOPN(1, FILTER( Table, [Gift Amount] > [Parameter Value] ), [Gift Amount], ASC )
)


Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Thanks! You're awesome!

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