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
ashmitp869
Responsive Resident
Responsive Resident

Help need to calculate budget * MP from two different tables

Hi,

I have a scenario where I need to calculate against CostItem ( Cost_item_id)

Budget * MP 

ashmitp869_2-1733105595302.png

BudgetMarkup = 
VAR _tb = SUMMARIZECOLUMNS(CostItem[Cost_item_id],Budget_Markup[CostItemId],Budget_Markup[MP],"Budget",[Budget])
RETURN

CALCULATE(SUMX(_tb,[MP]*[Budget]) , CostItem[Is_terminal]=true)

 

The relationship is

ashmitp869_0-1733105103496.png

 

Attaching a sample file.

https://github.com/suvechha/samplepbi/blob/main/sample_b.pbix

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

I am not sure what is your expected result, but please try something like below.

 

BudgetMarkup =
VAR _tb =
    SUMMARIZECOLUMNS (
        CostItem[Cost_item_id],
        Budget_Markup[MP],
        "Budget", [Budget]
    )
RETURN
    SUMX ( _tb, [MP] * [Budget] )

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

2 REPLIES 2
danextian
Super User
Super User

Your measure looks fine but what result do you expect?





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
Jihwan_Kim
Super User
Super User

Hi,

I am not sure what is your expected result, but please try something like below.

 

BudgetMarkup =
VAR _tb =
    SUMMARIZECOLUMNS (
        CostItem[Cost_item_id],
        Budget_Markup[MP],
        "Budget", [Budget]
    )
RETURN
    SUMX ( _tb, [MP] * [Budget] )

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors