Revit Architecture Forum
Welcome to Autodesk’s Revit Architecture Forums. Share your knowledge, ask questions, and explore popular Revit Architecture topics.
abbrechen
Suchergebnisse werden angezeigt für 
Anzeigen  nur  | Stattdessen suchen nach 
Meintest du: 

Rounding calc value to round up, not down?

9 ANTWORTEN 9
Antworten
Nachricht 1 von 10
gsucci
1024 Aufrufe, 9 Antworten

Rounding calc value to round up, not down?

hello,

 

see screen shot.  There is a calculated value that returns 1.275.  This needs to read as 2, but instead it is rounded to 1, when using the Format of the field.

Any way to adjust this?

(Using the roundup() function in the calc. value formula does not work, it will return the units count)

 
 

Snag_3ba9cad.png

9 ANTWORTEN 9
Nachricht 2 von 10
RDAOU
als Antwort auf: gsucci

@gsucci 

 

 

Count doesn't work in formulas...Instead of Count use a project parameter = Integer ...

 

Otherwise, Calc. Value roundup works as such.. /1 *1

 

  1. First do the roundup converting to an Integer of unit-less value (divide by 1)
  2. then convert the rounded integer back to Area or Length by multiplying by 1

RDAOU_0-1643401064008.png     RDAOU_4-1643401584146.png

 

If it does not work in one go, do it in 2 stages (ie: 2 separate calculated values)

RDAOU_2-1643401257500.png     RDAOU_1-1643401212109.png

 

 

 

YOUTUBE | BIM | COMPUTATIONAL DESIGN | PARAMETRIC DESIGN | GENERATIVE DESIGN | VISUAL PROGRAMMING
If you find this reply helpful kindly hit the LIKE BUTTON and if applicable please ACCEPT AS SOLUTION


Nachricht 3 von 10
ToanDN
als Antwort auf: gsucci

Is it what you are after?

 

ToanDN_0-1643402395486.png

 

 

Nachricht 4 von 10
mhiserZFHXS
als Antwort auf: ToanDN

I assume they just want to round up the final total. If everything were rounded up they would have more than two.

Nachricht 5 von 10
ToanDN
als Antwort auf: mhiserZFHXS


@mhiserZFHXS wrote:

I assume they just want to round up the final total. If everything were rounded up they would have more than two.


I see what you mean.

 

ToanDN_0-1643405424928.png

 

and with a conditional format to mask the line items:

 

ToanDN_0-1643405623565.png

 

 

Nachricht 6 von 10
gsucci
als Antwort auf: ToanDN

Yes, those numbers are what we need.
both 0.898 and 0.378 round up to 1.
Can't get to that result.
Nachricht 7 von 10
ToanDN
als Antwort auf: gsucci


@gsucci wrote:
Yes, those numbers are what we need.
both 0.898 and 0.378 round up to 1.
Can't get to that result.

See the attached 2022 file and reverse engineer the added calculated value parameters.

Nachricht 8 von 10
gsucci
als Antwort auf: ToanDN

I think this may work, although it is tricky.

 

I will look into it, thank you,

 

gio

Nachricht 9 von 10
gsucci
als Antwort auf: gsucci

So, I think this is the formula that needs to be used to round up values (thank you ToanDN):

 

Count% * RoundUP( <whateverformual> / Count%)

 

It works in most cases, except when you are working with subsets of the total number of elements (not the Count% of all elements).

 

It would be nice a less cumbersome way to do this, but, again, it seems to work for most cases.

 

thank you

 

Regards

 

 

Nachricht 10 von 10
ToanDN
als Antwort auf: gsucci


@gsucci wrote:

So, I think this is the formula that needs to be used to round up values (thank you ToanDN):

 

Count% * RoundUP( <whateverformual> / Count%)

 

It works in most cases, except when you are working with subsets of the total number of elements (not the Count% of all elements).

 

It would be nice a less cumbersome way to do this, but, again, it seems to work for most cases.

 

thank you

 

Regards

 

 


The issue is that you want to ROUND a value of Calculated Totals.  For the time being, Revit cannot apply any math Function to a Calculated Totals value, only to actual rows' data.  Percentage parameters are a means to bring the value of Calculated Totals back to the data rows so that Revit can process it.

 

If you have any specific case when it doesn't work, share it here and we will find out.

Sie finden nicht, was Sie suchen? Fragen Sie die Community oder teilen Sie Ihr Wissen mit anderen.

In Foren veröffentlichen  

Autodesk Design & Make Report