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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
v-yifanw-msft
Community Support
Community Support

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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