SOLVED

SharePoint Calculated Column and ISBLANK

Brass Contributor

So for this column I was a simple formula so it subtracts the value of another calculated column that outputs number data. The base formula is like this:

=[1stCalculatedColumn]-[2ndCalculatedColumn]-[3rdCalculatedColumn]

Simple enough. The problem is that normally the 2nd and 3d will be blank, so the end result in the column is an error. I've been trying to fiddle with an If and ISBLANK but haven't been able to accomplish what I need. The idea would be that if that 2nd or 3rd calculated columns are blank, it doesnt subtract from the 1st (either it will read as a blank "", or as a 0, as subtracting 0 shouldnt be a problem)

 

You know how I could acheive this? 

6 Replies

@Rickytruco Use formula like: 

 

=[1stCalculatedColumn]-IF(ISBLANK([2ndCalculatedColumn]),0,[2ndCalculatedColumn])-IF(ISBLANK([3rdCalculatedColumn]),0,[3rdCalculatedColumn])

 

Note:

  1. Sometimes comma( , ) does not work in formula (it is based on language or regional settings of your SharePoint site). So in that case use semicolon( ; ) instead of comma( , ).
  2. Use correct display name of your SharePoint columns in above formula.
  3. Wrap column names inside [] if your column name has space in it. For example: [My Column Name].

Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

@ganeshsanap ty for your reply. I tried this and it still has an error if the 2 or 3 columns are blank 😞 It now just say on that final column "#¿Name?"

@Rickytruco 

 

What are the column/data types of 2nd and 3rd column? Can you share screenshot of column settings page?

 

Also, share the screenshot of page where you are adding the formula with the updated formula you are using and screenshot of list view output where you see the error.


Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

@ganeshsanap hey again 🙂 So, they are all calculated columns that calculate the days between days. The 2nd and 3rd do it this way, as I needed for weeekends not to count (also holidays... but gave up on that as I had no idea how)

Captura de pantalla 2024-03-12 150344.pngThis creates a number type of data. So, I'm just tryng to subtract the difference betwen different dates.

best response confirmed by Rickytruco (Brass Contributor)
Solution

@Rickytruco 

 

You can try returning the 0 as result of calculation in formula of 2nd and 3rd column as well if none of the conditions met instead of returning blank string ("").

 

Can you try this once?


Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

Yes! That did the trick 🙂 Ty
1 best response

Accepted Solutions
best response confirmed by Rickytruco (Brass Contributor)
Solution

@Rickytruco 

 

You can try returning the 0 as result of calculation in formula of 2nd and 3rd column as well if none of the conditions met instead of returning blank string ("").

 

Can you try this once?


Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

View solution in original post