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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
jjkmd
Helper I
Helper I

adding up all values in a previous calculation

I'm trying to do a series of calculations that I won't go into at the moment.

I'm starting with a column "Charges90Rule"

Then create a measure

Charges All Partners 90% Rule = 
CALCULATE(sum(Monthly[Charges90Rule]),All(Monthly[Provider]),all(Provider),Monthly[Partner Status]="Partner")

This works to put the sum of "charges90Rule" in each and every row in the column.

 

Annotation 2019-07-22 222050.jpg

Then I do a few more calculations, and arrive at the measure "Average Charges per partner 90 Capped".  When I try to do the same adding up as I did before...

Charges All Partners 90% Rule Capped = 
CALCULATE([Average charges per partner 90 Capped],All(Monthly[Provider]),all(Provider),Monthly[Partner Status]="Partner")
I don't get something that adds up all the values - I get something in the 600k range when it should be in the high 3M range.  Seemingly same formula.  Is there some filter/summarize/all/values command I can mix in there to make this work?
1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@jjkmd I don't know how your tables are set up, why you are doing ALL (monthly[provider] and All(Provider)

 

Looks like you have provider table linked with monthly table.

 

Try following measure to sum up average

 

Charges All Partners 90% Rule Capped = 
CALCULATE( SUMX( VALUES( Monthly[Provider] ), [Average charges per partner 90 Capped]),Monthly[Partner Status]="Partner")


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

2 REPLIES 2
parry2k
Super User
Super User

@jjkmd I don't know how your tables are set up, why you are doing ALL (monthly[provider] and All(Provider)

 

Looks like you have provider table linked with monthly table.

 

Try following measure to sum up average

 

Charges All Partners 90% Rule Capped = 
CALCULATE( SUMX( VALUES( Monthly[Provider] ), [Average charges per partner 90 Capped]),Monthly[Partner Status]="Partner")


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.

Thanks, that worked with one minor tweak

 

Charges all partners capped via forums = CALCULATE( SUMX( VALUES( Monthly[Provider] ), [Average charges per partner 90 Capped]),all(Provider),Monthly[Partner Status]="Partner")
 
That gets me....
Capture.JPG
 
You were right I did not need both ALL (monthly[provider]) and All(Provider); but I do need the All(Provider) in order for each row above to be the 3.4M number.  Interestingly the ALL (monthly[provider]) does not get that.
 
Your formula got me 
Capture1.JPG
 
Still, that got me on the very right track.  it appears the key was to use the SUMX( VALUES( Monthly[Provider] ).  I"m going to have to research what kind of alchemy that "values" does.  ALso why you used Monthly[provider] with "Values".  I think once I understand that some concepts will click into place.
 
Thank you @parry2k 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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