Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Not applicable

Comparting values from different tables based on conditions

Hey guys!


I'm having troubles trying to compare values from two different tables. The situation is the following: I have two tables, "Enhancements" and "Budget", and I need to compare a value that is present on each of these.


Enhancements Table

ID - Cost Status - Cost

01 - Estimated - 100

02 - Estimated - 200

03 - Confirmed - 250


Budget Table

ID - Cost Status - Cost

01 - Planned - 100

01 - Actual - 120

01 - Projection - 100

02 - Planned - 200

02 - Actual - 220

02 - Projection - 200


So, while one table has a single cost, the other table has 3 different cost values.


These tables are connectec through a fact table, like this:




What I need to do is, create a calculated table that can compare the cost values present on both of these tables, but respecting it's status. So for example:

Compare cost of ID 01 on both tables, where "estimated" status is equal "planned" on the other table, and do the same for the status "confirmed", where it equals "actual" on the other table.


I tried the following:

Compare = LOOKUPVALUE(Compare[Cost];Compare[ID];Budget[ID]; FILTER(Budget;Budget[Status]="Planned"))


It doesn't work though 😕


Can anyone help me with that?

Community Support
Community Support



Create a calculate column on Budget Table using DAX like this:



Compare Cost =
    [Cost status],
    "Planned", LOOKUPVALUE (
        Enhancements Table[Cost],
        Enhancements Table[ID], Budget Table[ID],
        Enhancements Table[Cost Status], "Estimated "
    "actual", LOOKUPVALUE (
        Enhancements Table[Cost],
        Enhancements Table[ID], Budget Table[ID],
        Enhancements Table[Cost Status], "confirmed"



Jimmy Tao


Not applicable

Hi @v-yuta-msft


Thanks a lot for the reply!


Your code doesn't seem to be doing anything. What I need to do is, compare the costs on both tables, so I can know which are different and which have the same value, so I can show them and etc.



Helpful resources

PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors