PDA

View Full Version : "Count" field in a schedule



tonyisenhoff
2004-03-30, 07:37 PM
I want to get the difference between the "Count" field and a "Target" field in the schedule.

When I try to create a formula I get an error (see attached)

Am I doing something wrong?

Thanks,
Tony

Tom Dorner
2004-03-30, 08:08 PM
Tony,

Make sure that you have the correct project or shared parameters defined with the correct datatype and assigned to the proper category you are trying to schedule.

It would be wise to avoid naming any parameter with a name that is the same as the data type such as "number". I alway try to use more unique names that are not likely to be confused with any other existing parameters or data types.

Make sure that the parameters you defined are in the schedule you are creating. When you do the calculated value be very careful of spelling and punctuation (caps vs small letters make a difference!). Also be sure that your are doing math on the same data type or else converting data types (ie. "number - number = number" not "number-area= text")

I did a quick schedule doing the type of math you are trying to do and it worked fine for me. Schedules and parameters can be a little tricky though.

Hope this helps.

Tom

beegee
2004-03-30, 09:54 PM
"Count" ,being the number of elements in the schedule as returned in the Sorting/Grouping totals, is not a valid field for use in a schedule formula.

The schedule formula can only use parameters and shared parameters as fields, whereas Count is a "hardwired' calculation.

archjake
2004-03-31, 01:05 AM
This is a tricky one.
The work around goes like this:
In your family add a parameter called '--- count' (Ex: ‘plumbing count’) as we did for plumbing fixtures. Set this parameter to 1.
Add the parameter to your schedule.
Next, (the very important step) check the appropriate boxes so the schedule calculates the total for this field. If you don't do this, it won't keep track of the count for multiple items.

If you add two of the families to your project, it should show up as 2., three, 3... etc. when the schedule is set to not show every instance.

This will be your new 'count' to base your calculations on.

If you don’t need the ‘--- count’ column to show the totals on your schedule, make it a hidden field, and use the standard count parameter. They should match if you do everything correctly.

It took quite some time to figgure this one out.

I hope this helps rather than confuses.

Jake

beegee
2004-03-31, 01:50 AM
Hi Jake,

After adding a shared parameter (count ) to the family and including that parameter in the schedule and getting the schedule to total that parameter, ( referred to as Count_Total ) how do you then use that total in a formula ? (as in Count_Total - Target )

archjake
2004-03-31, 02:38 AM
beegee,

It looks like the calculations must be made from within the family.

If you try to use Count_Total - Target from a schedule it appears that Count_Total is read as 1. If the calculation is done from within the family, it will read Count_Total as a total of all families within the project. That is, if the schedule is set to total the parameter.

its hard to understand how the entire process works, but it does.

Please see the attached project and family.

beegee
2004-03-31, 03:11 AM
Hi Jake,

That is interesting.

I didn't think it could be done through the schedule fields independent of the family.

The important thing is to schedule / sort by type, so that the Count parameter then totals for that type.

The good thing is ... it does work.

hand471037
2004-03-31, 08:12 AM
archjake, thanks for the tip, and welcome to Zoog! I went to school in Tucson, and still miss it sometimes. :)

tonyisenhoff
2004-06-29, 07:31 PM
Ok - Sorry to bring this back to life, but I'm having trouble!

I've attached what I've done thus far:
1. Family (calculations within the family as noted previously)
2. Family
3. Shared Parameter File

You can see that when I place the family into a project, my schedules don't total the delta correctly :(

I feel like I've tried everything stated previously and more, but obviously I'm missing something.

Thanks in advance!

archjake
2004-07-01, 03:56 AM
I'm not sure if this is what you were looking for, but I played around with your files.

First of all, you need to use type parameter on a minimum of the count field for the family. I'm not sure if they others need to be a type parameter or instance I set them to be a type.
Then I played with your schedule until it worked. I'm not sure what the magic setting was, but here are the files.

tonyisenhoff
2004-07-01, 01:19 PM
I'm not sure if this is what you were looking for, but I played around with your files.

First of all, you need to use type parameter on a minimum of the count field for the family. I'm not sure if they others need to be a type parameter or instance I set them to be a type.
Then I played with your schedule until it worked. I'm not sure what the magic setting was, but here are the files.

Close... But you will notice that the target is not correct. If you have just one type placed, all is fine. Everytime you add another type, the target count is added up (it shouldn't be). For example if target is 12 in the family, everytime you place that type, the count is added up! So instead of 12 as my target, is 36 (if you place 3 of that type...)

Does that make sense?

Tony

tonyisenhoff
2004-07-01, 01:35 PM
This is really weird...

When I opened the file you created, type 1 and type 2 had the correct "Target" displayed, type 3 was wrong...

But as soon as I add anther in the project, ALL the target numbers goes wacko!

archjake
2004-07-02, 02:46 AM
Okay I played with this again, and now that I understand what you want...

Family count = how many families are placed in the project.
Target count is the known quantity needed in the project.
Delta should equal zero when Family count = Target count.

I tried everything I know of, and here is what I learned.

It seems that our family count will only calculate correctly (total families in project) if the parameter that is using family count (delta) is totaled in the schedule as well.

That won't work for us in this case.

Here is what we need:
target count - family count = delta
for example. 5 families in the project with 10 families needed will result in
10-5=5

Instead we are getting 5 families in the project with 10 families needed:
1-10=9

1being the family count in the family.

if we total delta in the schedule we will get
5-10=45

45 being 9 times 5

Why can't we just calculate from Count?

Anyone else have ideas on this one?

tonyisenhoff
2004-07-02, 12:59 PM
I agree about just using the "COUNT" field...

Please put that on the wishlist - it would make this a simple process!!

DaveP
2005-02-15, 08:02 PM
Why can't we just calculate from Count?

Anyone else have ideas on this one?
Anything new on this?
Doesn't look like it changed in 7.0
Any hope for being able to use "Count" in8.0?

Steve Cashman
2005-05-11, 09:45 PM
Anything new on this?
Doesn't look like it changed in 7.0
Any hope for being able to use "Count" in8.0?
I tried this again in Revit 8 and it appears you still cannot use "Count" in a calculated field. That really seems like a limitation to me. It appears the error message changed in 8, but that's still no help.

I've had three separate architects independently try this when creating different types of schedules and each ran into the same limitation. I've read the threads and everything just seems like a workaround to a problem. This is something that architect's want. We should be able to create calculated fields for any field in the schedule, whether "hardwired" or ours. This is a really problem when you want to do some fast cost estimating. The fact that you can't multiply "Cost" by "Count" just doesn't seem right.

I really think this should be addressed so it's intuitive and you can use the count field in a calculated field formula.

Thanks.

s.messing
2006-11-19, 10:48 PM
Hi guys,
I just wanted to check in and see whether this whole count scenario is: 1. on people's wish list, whether it is: 2. on Revit's "never list", or whether: 3. the workarounds have gotten simpler.
At the moment, to use count for any form of calculation, I am making a new field (param) called manual count. Then, in the schedule, I read the count value and type it manually into the manual count column. I have to manually update it every time I make a change. Is this still the best way? Just checking to make sure I am not doing a whole bunch of extra steps only to find out that there's an easier way.
Cheers,
Stephen

EDIT:
Oops: I see here (http://forums.augi.com/showthread.php?t=50808&highlight=count+formula)that this issue is a "long standing wish list item" according to DaveP. But, just in case, my question still stands: Is there a better (more "automatic") way?

Cory.Killpack
2009-06-18, 11:36 PM
The easier/automated way is as archjake described earlier in this thread. It does take a little in depth tinkering with check boxes and shared parameters, but works great after it's set up the first time. And btw, thanks archjake for getting me through it!

Although, his description was a little hard to follow, perhaps to sum the process:

Within a family, create shared parameters for x-count and total, and assign them as type parameters.
Within a schedule, add those parameters to the scheduled fields.
On the Formatting tab of the Schedule Properties, select the Calculate Totals box for those parameters (and optionally hiding the x-count field).

Hope that helps.

vmalerbajr
2009-09-01, 08:35 PM
All,
great posts!

sorry for the tangeant but how about area schedules with target area and actual area...
and a column with calculated difference?

we can create a parameter for the target area but can we get a delta from our target area parameter and the actual area created?

thanks and again great info in the previous posts....i hope to use that info when neeeded to schedule counts.

m.reddrick
2009-11-18, 05:00 PM
I have another question related to the thread above (using count in a calculated value for a schedule). Following the directions above, I added a instance room parameter called "Room Count" to all of my rooms. I made the value in each room "1". So then when I calculated the totals in the schedule, I had a Room Count parameter that I could use in formulas that was identical to the "Count" parameter. So far so good. However, for some reason when I created a new calculated value field "SF Per Space" by dividing my Total Area by my new Room Count parameter, it worked fine for 80% of the fields, but it didn't work for about 20% of them (no value appeared). Does anyone know what I may be doing wrong?

To answer the question in the previous post, once a Required Area parameter is added to the rooms, you can get a delta between it and the actual area using a calculated value in the schedule. Your calculated value type would be "Area", and the formula would be Area-Required Area. So you would get a negative value if the Actual Area is too small, and a positive delta if the actual area is too big. The exact parameter name would need to be used in the formula.

m.reddrick
2009-11-18, 06:21 PM
Okay, I think I found a common thread for the rows where my calculated value (Total Area/Room Count) isn't working. In the rows where it is working, each instance of the room (all three "pantries", for example) has the exact same area, and in the rows where it isn't working (the four "conference rooms, for example) at least one of the instances has a different area than the others. I tested this out, and that seems to be exactly what the problem is.

I echo previous posts when I say that I wish that "Count" could be used as a calculated value. If anyone comes up with another workaround for using a "room count" as a calculated value (I have four conference rooms, the total summed area of all conference rooms is 4000 SF, so my average size is 1000 SF), please let me know!