cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
thomas_coltrain
Frequent Visitor

Simple Subtract measure causing issues

Hey,

So I would think that this simple subtract measure should work but it makes 3 extra lines when applying this measure.

Total_Cost minus Total_Price =
SUM('Job_Planning_Lines'[Total_Price]) - SUM('Job_Planning_Lines'[Total_Cost])
All I am trying to do is subtract the columns of  ('Job_Planning_Lines'[Total_Cost]) - ('Job_Planning_Lines'[Total_Price]) and for the new column to be the result.  This is all in the same field so should not be a relationship issue.  Screenshots below
budgeted price = total price and budgeted cost = total cost
thomas_coltrain_0-1636405013455.png
and once I apply the measure 
thomas_coltrain_1-1636405087093.png

Feel like I am missing something simple here, if any more info is needed please let me know and any help is much appreciated!!

Thanks,

Thomas

3 REPLIES 3
yingyinr
Community Support
Community Support

Hi @thomas_coltrain ,

Are the fields marked in green in the screenshot below and the fields marked in red from the same table Job_Planning_Lines? If not, could you please provide some sample data from each of these referenced tables on the visual, and if these tables have created relationships, please provide the corresponding relationship information (based field, cardinality, direction etc.).

yingyinr_0-1636598047190.png

In addition, please review the following thread that have similar problems to yours and check if its solution can also solve your problem.

Measure is creating duplicate rows in a table

 Couple of reasons I can think of.

1. These measures are coming from different tables and one of them have a problem with  project join

2. Both table has project ID, and there is a common project table(Project Dimension) and you took project or project name from a fact, not from Dimension

3. One of the measures is using all/all selected. even possible when they are from the same table


Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Ashish_Mathur
Super User
Super User

Hi,

Share the download link of your PBI file and show the problem there clearly.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
PaulDBrown
Super User
Super User

What field are you using as the filter conext in the table and what relationship does it have with other tables where the calculations occur?





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Helpful resources

Announcements
June 2022 update 768X460.jpg

Check it out!

Click here to read more about the June 2022 updates!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power BI Dev Camp Session 23 768x460.jpg

Check it Out!

Mark your calendars and join us on Thursday, June 30 at 11a PDT for a great session with Ted Pattison!

June 20 episode 7 with aka link 768x460.jpg

The Power BI Community Show

Join us on June 20 at 11 am PDT when Kim Manis shares the latest on Azure Synapse analytics, the Microsoft Intelligent Data Platform, and notable Power BI Updates from Microsoft Build 2022.

Top Solution Authors
Top Kudoed Authors