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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

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
May PBI 25 Carousel

Power BI Monthly Update - May 2025

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

May 2025 Monthly Update

Fabric Community Update - May 2025

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