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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

SUMX at an aggregated level?

I have some data that looks like this:

MonthParentChildCupcakes

Feb

Smith110
FebSmith25
FebJohn17
JulSmith110

 

I have several measures:

  • Sum of Feb cupcakes
  • Sum of Jul cupcakes
  • Jul - Feb (change)
  • Change = if(jul-feb<0,"Decliner","Advancer")

The goal is to sum all of the advancers at the parent level. I used a sumx but it's determining if it's advancer/decliner at the child level... any idea on how to establish if it's an advacner/decliner at the parent level? Thanks so much!! 

1 ACCEPTED SOLUTION

@Anonymous 

Like this

Average =
SUMX (
    SUMMARIZE ( 'Table', 'Table'[Parent], 'Table'[Child] ),
    IF ( [Change] = "Decliner", [Jul-Feb] )
)

View solution in original post

5 REPLIES 5
tamerj1
Super User
Super User

Hi @Anonymous 
Please try

Average =
SUMX ( VALUES ( 'Table'[Parent] ), IF ( [Change] = "Advancer", 1 ) )
Anonymous
Not applicable

I think this sums the number of parents. I'm looking to sum cupcakes at the parent level (versus child level). Thanks so much! 

 @Anonymous 

Please try

Average =
SUMX (
    SUMMARIZE ( 'Table', 'Table'[Parent], 'Table'[Child] ),
    IF ( [Change] = "Advancer", 1 )
)
Anonymous
Not applicable

I'm trying to sum the measure Jul minus Feb at the parent level. How do I incorporate that into the formula? Thanks so much! 

 

ParentJul-Feb (Change in Cupcakes)Decliner/Advancer
Smith-5Decliner
John-7Decliner

 

But then the goal of this new sumx to sum all of the decliners (-12)

@Anonymous 

Like this

Average =
SUMX (
    SUMMARIZE ( 'Table', 'Table'[Parent], 'Table'[Child] ),
    IF ( [Change] = "Decliner", [Jul-Feb] )
)

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.