Can someone help me with a Calculated Value in a schedule? It is rather too complicated for my brain. Thanks.
Field [A] (manual number), Field [B] (manual text), Field [C] (calculated value text)
Formula:
If [A] < X1 then [C] = Z1
If [A] >= X1 then [C] = Z2
If X1 =< [A] < X2 and [B] = Y then [C] = Z3
Hi,
You won't be able to get exactly what you want. But with Revit there are always workarounds 🙂
The problem is that you can't compare strings in revit formulas.
if [B] needs to be accessible as a text somewhere else it needs to be linked to another parameter for the whole thing to work. Like a Yes/No parameter or an Integer. Otherwise, I'd suggest to have it simply as a yes/no parameter.
For example [B] equals Y only if it's not Blue or Red
Create yes/no parameters called Blue and Red
In [B] add formula
if(Blue, "Is Blue", if(Red, "Is Red", "Y"))
In [C] add formula
if(a < x1, "Z1", if(not(a < x1), "Z2", if(and(not(a > x2), and(not(Blue), not(Red))), "Z3", "It's Blue or Red")))
But that assumes you can change the elements you want to schedule.
Otherwise, I'd suggest to create a Dynamo definition.
Can't find what you're looking for? Ask the community or share your knowledge.