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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Chrishomenko
Frequent Visitor

Measure and new column calculation not as expected

Attempting to get remaining budget and not getting expected results.

 

New column in timesheet table ( which has the costs)- related to purchase order via job table.

Remaining Budget = SUM('cr014_purchaseorder'[Amount]) - SUM('cr014_timesheet (2)'[Price - Subtotal]
 
ie 84,697-33,704.86= 50,992.14. but shows -11,276,442??
 
tried quick measures but results not as expected and also added rows ( data below filtered )
 

Chrishomenko_2-1674688022608.png

 

Chrishomenko_3-1674688113586.png

 

3 REPLIES 3
Chrishomenko
Frequent Visitor

looks like i solved it by using "max" vs sum

 

MAX('cr014_purchaseorder'[Amount]) -SUM('cr014_timesheet (2)'[Price - Subtotal])
 
Chrishomenko_0-1674762111279.png
but totals are wrong
Chrishomenko_1-1674762906656.png

 

Chrishomenko
Frequent Visitor

Thanks very much for you time, great articles you posted. 

Believe i need to use summarize or hason filter but unclear how to get there. 

 

Get the remaining budget available from a purchase order amount

(purchase order[amount]) SUBTRACTED BY  sum (timesheet[price-subtotal]) WHERE the (timsheet [job ]) EQUALS the (purchase order[job])

 

$33,755- 5037.56 = $28717.44 (shows $4,228,665.75- unclear what this is, not total of all po amounts as is different for ever row

 

Remaining Budget = SUM('cr014_purchaseorder'[Amount]) - SUM('cr014_timesheet (2)'[Price - Subtotal])

(DID AS A NEW COLUMN)

when i do as i measure the filter visual stops working and shows the po number for every job in table

Chrishomenko_0-1674749779916.png

 

Chrishomenko_1-1674749808462.png

 

Chrishomenko_2-1674749838945.png

 

Chrishomenko_3-1674749861708.png

 

 

Greg_Deckler
Super User
Super User

@Chrishomenko Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.