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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
newbiePBIuser
New Member

The value from one query of quarterly data is adding to all quarters in another

newbiePBIuser_0-1698956214350.png

The Closed & Pipeline visuals are correct and come from two separate tables.

However, when I try to add the two fields together using SUMX it is adding the Q4 amount to all quarters and products.

Closed Sales w/Pipeline = SUMX('Closed','Closed'[Commissionable Revenue])+SUMX('PIPELINE','PIPELINE'[BG Rev Split])

 

The Pipeline in Q4 is adding to all of the quarters and not just Q4. For ex. there should be no changes in Q1-Q3

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @newbiePBIuser ,

I created a sample pbix file(see the attachment), please check if that is what you want.

Measure = 
VAR _qtr =
    SELECTEDVALUE ( 'Closed'[Quarter] )
VAR _fruit =
    SELECTEDVALUE ( 'Closed'[Fruit] )
VAR _closed =
    SUM ( 'Closed'[Commissionable Revenue] )
VAR _pipeline =
    CALCULATE (
        SUM ( 'PIPELINE'[BG Rev Split] ),
        FILTER ( 'PIPELINE', 'PIPELINE'[Quarter] = _qtr && 'PIPELINE'[Fruit] = _fruit )
    )
RETURN
    _closed + _pipeline
Closed Sales w/Pipeline = SUMX ( GROUPBY ( 'Closed', 'Closed'[Quarter], 'Closed'[Fruit] ), [Measure] )

vyiruanmsft_0-1699264743447.png

Best Regards

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @newbiePBIuser ,

I created a sample pbix file(see the attachment), please check if that is what you want.

Measure = 
VAR _qtr =
    SELECTEDVALUE ( 'Closed'[Quarter] )
VAR _fruit =
    SELECTEDVALUE ( 'Closed'[Fruit] )
VAR _closed =
    SUM ( 'Closed'[Commissionable Revenue] )
VAR _pipeline =
    CALCULATE (
        SUM ( 'PIPELINE'[BG Rev Split] ),
        FILTER ( 'PIPELINE', 'PIPELINE'[Quarter] = _qtr && 'PIPELINE'[Fruit] = _fruit )
    )
RETURN
    _closed + _pipeline
Closed Sales w/Pipeline = SUMX ( GROUPBY ( 'Closed', 'Closed'[Quarter], 'Closed'[Fruit] ), [Measure] )

vyiruanmsft_0-1699264743447.png

Best Regards

parry2k
Super User
Super User

@newbiePBIuser not fully clear what you are trying to achieve. Read this post to get your answer quickly.

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



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.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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