IF calculated formulas in schedules

IF calculated formulas in schedules

EliseMoss
Enthusiast Enthusiast
221 Views
9 Replies
Message 1 of 10

IF calculated formulas in schedules

EliseMoss
Enthusiast
Enthusiast

I am trying to create a multi-category schedule in Revit to calculate conduit runs. I was able to do this with previous releases using a shared/project parameter, but it doesn't appear to work in Revit 2026.

 

I have attached some images to help explain my process.

 

elbow formulas.JPG

 

I started out by creating several parameters with formulas and applying it to the elbow fitting I am using in my conduit runs. I want to include the Elbow Outside Length in the multi-category schedule.

 

schedule.JPG

In my multi-category schedule, I have the conduits and elbow fittings. I created a shared parameter called Conduit Run Name and applied it to each conduit run and then used a filter so only conduits and fittings with an assigned conduit name were included in the schedule.

 

I then want to be able to add the Conduit Lengths to the Elbow Outside Lengths to get a calculated length total for each run.

 

I thought an IF formula would work best. It has no problem transferring the value for the Conduit Length, but it ignores the values in the Elbow Outside Length parameter.

 

calculated length.JPG

 

I have tried all sorts of different formulas with no success.

 

I tried testing to see if Revit sees the value in the Elbow Outside parameter...

if(Elbow Outside Length > 0 ft, 1, 0)

This is the Elbow test column.

 

I have tried this formula:

if(Conduit Length > 0 ft, Conduit Length, Elbow Outside Length)

 

I haven't been able to get it to work, so looking for some guidance here.

 

TIA,

0 Likes
Accepted solutions (1)
222 Views
9 Replies
Replies (9)
Message 2 of 10

RLY_15
Advisor
Advisor

Your if statement reads: "If Conduit length is greater than 0, the value is Conduit Length. Otherwise, If EOL is greater than 0, the value is EOL. Otherwise, the value is 0".

 

It doesn't appear that your PVC fittings has a value set for Conduit Length, does it have the same lookup table formula? I would expect there to be 'some' value there, and the lack of value (null) may be causing issues with your if statement.

0 Likes
Message 3 of 10

EliseMoss
Enthusiast
Enthusiast

The PVC fittings have the length stored in the EOL parameter. So, I am looking to copy that value into the Conduit Length parameter.

0 Likes
Message 4 of 10

RLY_15
Advisor
Advisor

RLY_15_2-1757363985785.png

 

It is the treatment of nulls in conditional formatting. This is the same formula [if(A>0,A,if(B>0,B,0))]

 

When both parameters have values, the 'greater than zero' logic checks do what they do, so you get A.

When A does not have a value (null), it cannot complete the conditional logic, so it returns null.

When B does not have a value, but A does, you get a value because the portion of the conditional logic that would trip up on the null (is B>0) is never used.

When neither have a value (null x2), it hangs up on the first conditional logic check (is A>0?) and returns null.

 

The short answer is to always have a value set for A and B within each family. Conditional logic in schedules just doesn't work with nulls.

0 Likes
Message 5 of 10

EliseMoss
Enthusiast
Enthusiast

EliseMoss_0-1757862164235.png

I tried this formula as well.

EliseMoss_1-1757862204759.png

The Conduit Length gets copied over to the Calculated Length, but the Elbow Outside Length does not.

 

0 Likes
Message 6 of 10

RLY_15
Advisor
Advisor

Yep, see my post above. It's an issue with having null values in conditional logic. You have to have both parameters filled out for the logic to work as expected.

0 Likes
Message 7 of 10

EliseMoss
Enthusiast
Enthusiast

Yes, and if you look at the Elbow Outside Length Column, there are values. They aren't being carried over.

0 Likes
Message 8 of 10

RLY_15
Advisor
Advisor
Accepted solution

For 'Emergency High UG', there is no value for Conduit Length.

 

Because there is no value for conduit length, the if(Conduit Length>0) test fails, so nothing carries over.

To be more specific, when there is no value in the parameter, 'Parameter>0' does not return true OR false. It just doesn't do anything (no value, or null).

Message 9 of 10

EliseMoss
Enthusiast
Enthusiast

Right because elbows or fittings don't have that parameter. This is why there is a calculated field called Elbow Outside Length which needs to be copied over to Calculated Length, so the Calculated Length can total the conduit length and fitting length.  I even added a column called Elbow Test to verify that Elbow Outside Length is greater than 0. If you look at that column, you see that this is true. 

0 Likes
Message 10 of 10

RLY_15
Advisor
Advisor

Understood. Unfortunately, you cannot use conditional logic to handle 'this or that', unless both fields are filled out. You also cannot use operators (+/-/*/etc.) with empty values. I get what you want but it's not something Revit can handle without holding its hand.

 

The simplest option for you at this point is to group by value, and replace all empty entries with 0.