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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Error when subtracting a calculated column with a measure

Hello.

I have an issue where I have a column, lets call it "Gap", that takes a measure ("Measure A") and subtracts a calculated column, ("Column B"). When I do this, the calculation that I am looking for is incorrect. When I put in:

 

Gap =Measure A-Column B

and 

Measure A=24 

Column B= 20

 

So the answer would be 24-20=4. However the answer Power BI is giving me is -19.

 

etills_0-1702784887963.png

 

 

Why is the table that I have these columns in showing the gap column to have -19. All other calculations are incorrect. Could you please explain to me why its doing this when I have a Measure be subtracted by a column?

 

The reason I have a Measure in the first place, is because I have it synced with a slider to allow the user to change around the weights. Please let me know

 

3 REPLIES 3
Anonymous
Not applicable

Hi @Fowmy 

Thank you for your response. From what I understand, because I am trying to make changes to column "Gap" in the report view, utilizing the slider for Measure A, it of course is not reflected in the table view, therefore it will not show the correct answer. 

Are you saying I should turn "column b" and "gap" into a measure? If so how would I do that. "Column B" is actually a ranking of another calculated column that is filtered by third column.   

@Anonymous 

Sharing a dummy Power BI file representing your scenario would be beneficial. You can save the Power BI file on Google Drive or any other cloud storage platform and provide the link here. Kindly ensure that permission is granted to open the file.

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Fowmy
Super User
Super User

@Anonymous 

 

When you create a calculated column in a table, any selection that you make on your report canvas is not known to the formula in the calculated column because what's happens is the order in which the stages take place. First the model is completed then the tables are ready for report building. Try to build a measure instead which can make use of the slicer selection. I hope this is clear. 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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