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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

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