What's new

# Using Counts within Formula? **Solved**

##### Member
Hello Everyone, Happy New Year! Wishing everyone the very best for 2022!

I am creating some formulas in a design I'm working on and I am having an issue adding a non-measurement (count) integer into my equation (They always get converted into an inch value).

As an example: VAR_SHELF_SPACING = (GP_SHELF_HEIGHT - ((GP_NUMBER_OF_SHELVES_COUNT-1) * GP_MATERIAL_THICKNESS))/3
(GP = Global Parameter Variable)
Becomes:
VAR_SHELF_SPACING = (GP_SHELF_HEIGHT - ((GP_NUMBER_OF_SHELVES_COUNT-1") * GP_MATERIAL_THICKNESS))/3
This formula is now broken as it is trying to subtract a Measurement from a Count value.

Is there way to denote a value as a count within an equation? Something like: GP_NUMBER_OF_SHELVES_COUNT-

Also, for additional context, changing the GP_NUMBER_OF_SHELVES_COUNT value to one less in global parameters breaks other relationships in the project so that isn't an option. Creating a new GP for this specific purpose would also be a solution but I am mostly just interested if there is a way to do this on the fly.

I couldn't find anything in the help files on this matter. Any help or suggestions are greatly appreciated!

#### DavidJ

##### Alibre Super User
Staff member
Define a Count parameter called ONE, set it equal to 1. Use ONE in your equations.

There is an article that explains this, but I'm not at my main computer where I keep the links...

• #### Ralf

##### Alibre Super User
Here is the link • ##### Member
Define a Count parameter called ONE, set it equal to 1. Use ONE in your equations.

There is an article that explains this, but I'm not at my main computer where I keep the links...
Thanks David, this is essentially what I meant in the original post about when I mentioned creating a new Global Parameter for this specific purpose. Too bad there isn't a simpler way to define a count values. Oh well.

Happy holidays!

Here is the link 