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
jusTodd
Advocate III
Advocate III

Simple Subtraction Problem

Attempting to do the death-defying performance of simple subtraction between two columns in Power Query is not giving me the expected results.

 

Still a freshman to whi world, can someone help me understand what is going on here?

 

The story begins after merging two tables to get one field needed from another table to create a new table.

 

I chose "Custom Column," and in the dialog choosing the columns from Available Columns, I wrote [Column A]-[Column B], which provided me with nothing but null values and did no subtraction at all.  Both are Whole Number Columns

 

[#"Total Billable Duration (Min)"]-[ISPDataBasic.Duration Min]

 

I also tried to pull off this daring act of complex arithmatic with the following:

 

"Value.Subtract([#"Total Billable Duration (Min)"],[ISPDataBasic.Duration Min])"

 

It did not work either.  I do not understand.  (edited ... previously said it did work.  It does not.)

 

One thing I did note; it changed what I expected to be simply [Total Billable Duration (Min)] into [#"Total Billable Duration (Min)"].

 

When attempting to correct it to remove the # and the quotes, it indicated there was Invalid Identifier (screen shot below).  Still, that is no help.  What it transformed that portion of the equation into does not work.

 

jusTodd_0-1683214386307.png

 

1 ACCEPTED SOLUTION

That is exactly what I did!

 

Thank you for reminding me of the silliest thing.

 

   480-null = null

 

I needed to replace null with 0 first.

 

Now it works.

View solution in original post

3 REPLIES 3
JamieW135
Frequent Visitor

Thanks, this really helped me, I forgot that null actually existed in the cell and could be replaced!  So simple.,.. 

watkinnc
Super User
Super User

Just CHOOSE your columns from the box on the right. Choose, then write a minus sign, then choose again, and you're done.

 

--Nate


I’m usually answering from my phone, which means the results are visualized only in my mind. You’ll need to use my answer to know that it works—but it will work!!

That is exactly what I did!

 

Thank you for reminding me of the silliest thing.

 

   480-null = null

 

I needed to replace null with 0 first.

 

Now it works.

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.

Top Solution Authors
Top Kudoed Authors