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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
v-yiruan-msft
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
Community Champion
Community Champion

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.