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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
amiller5
Helper II
Helper II

Sum of two columns in two different tables

I have two tables - one with historical values related to stages - this one is filtered to these specific stages.

And then I have another table from a different source with the accepted and declined stages.

amiller5_0-1659460771585.png

 

I need to create a measure that combines the total filtered amount from the 1st table and only the "Closed accepted" from the second.

 

I have tried summing the two separately and the number is not coming out correctly (see "Total pipeline (2)") - even with the correct filters.

total historical amount = SUM('Sales 4'[Historical Amount])
Closed accepted value = CALCULATE(SUM('Sales 1'[Amount]),FILTER('Sales 1','Sales 1'[Stage]="Closed - Accepted"))
Total pipeline (2) = 'Sales 4'[total historical amount]+'Sales 1'[Closed accepted value]
 
Do I need to also filter the historical amount in the measure to get the correct value?
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @amiller5 ,

It seems that you apply visual-level filter on 1st table visual, and it will only effect the data display of current visual... So you need to update the formula of measure [total historical amount] as below with the filtered options in Filters pane.

yingyinr_0-1659678923835.png

 

total historical amount =
CALCULATE (
    SUM ( 'Sales 4'[Historical Amount] ),
    FILTER (
        'Sales 4',
        'Sales 4'[Historical Stage]
            IN {
            "Opportunity conxxx",
            "Use Case Demo",
            "Business Negotiation",
            "Contract Submitted",
            "Legal Review"
        }
    )
)

 

Or you can apply the field [Historical Stage] of the historical table to create one slicer to filter 1st table visual and replace the original visual-level filter. Then you no need to the formula of measure [total historical amount]...

yingyinr_1-1659682716616.png

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

 

 

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @amiller5 ,

It seems that you apply visual-level filter on 1st table visual, and it will only effect the data display of current visual... So you need to update the formula of measure [total historical amount] as below with the filtered options in Filters pane.

yingyinr_0-1659678923835.png

 

total historical amount =
CALCULATE (
    SUM ( 'Sales 4'[Historical Amount] ),
    FILTER (
        'Sales 4',
        'Sales 4'[Historical Stage]
            IN {
            "Opportunity conxxx",
            "Use Case Demo",
            "Business Negotiation",
            "Contract Submitted",
            "Legal Review"
        }
    )
)

 

Or you can apply the field [Historical Stage] of the historical table to create one slicer to filter 1st table visual and replace the original visual-level filter. Then you no need to the formula of measure [total historical amount]...

yingyinr_1-1659682716616.png

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

 

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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