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
tshep
Regular Visitor

Cost Variance between two selected projects

We have a database with values for Project budgets for various cost codes. I want to compare line item budgets between 2 projects.

I think I've figured out how to create a matrix that filters by two slicers, so that I can narrow down to 2 projects for comparison. 

I don't know how to create a column or measure that calculates the variance between the selected project 'ECAC' values.

The 'ECAC' field gives dollar values and can be sorted by division ('infoJson.root_cost code') and cost code ('inforJson.cost_code')

 

Measue to show selected projects ECAC (budget field).

Budget Comparison =
CALCULATE(
    [ECAC],
    FILTER(
        Project,
        Project[name] IN {SELECTEDVALUE('PCI_First Project'[name]), SELECTEDVALUE('PCI_Second Project'[name])}
    )
)
 
budget comparison.png
1 REPLY 1
Anonymous
Not applicable

Hi @tshep ,

Based on the information you have provided, can you give more detailed information without including private information, such as what your PCI_First Project table and PCI_Second Project table probably look like. How they relate to the Project table. What kind of result you want to achieve in the end.

 

How to Get Your Question Answered Quickly - Microsoft Fabric Community

If it does not help, please provide more details with your desired out put and pbix file without privacy information.

 

Best Regards,

Ada Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.