Hi there, i’m trying to solve the following problem : i’ve got furniture families with 2 accurrences of the same nested family in it. These nested families contain the same parameter (artikelgroep) but they can differ so i created 2 separate parameters for them in the host (artikelgroep1 and artikelgroep2). Now i need to read out the values of both parameters and count their number. For example: a storage shelf gondola with on one side artikelgroep 45 (artikelgroep1) and on the other 98 (artikelgroep2). How can i count the total accurences of 45 and 98 in 1 schedule. I’ve already tried bits and pieces in Dynamo, but i dind’t find the right code for me. For now i work with 3 schedules: one for artikelgroep, 1 for artikelgroep 1 and another for artikelgroep2, but i can’t combine them with plain Revit.
You can setup calculated value fields in your schedule and use an if statement to enter a value when one of the other parameters equals whatever. In the example below, the CountIf is a calculated value field. I told it to return 1 if the Length value is greater than 12, otherwise return 0. Then you can set that field to calculate the sum. Just be aware that your types must match or you will get an error about improper use of boolean. If everything is a number value, it will be easy.

DIM_LENGTH is actually the LENGTH field renamed.

Use this to create the calculated field

thanx Staylor, but unfortunately because of the 2 parameters i can only count them in different schedules. So maybe the question is better stated as: how can i combine 2 schedules (or actually 3) into one?
Not sure I follow why you can’t count them all in one schedule. You would set up a calc value field for each instance to be counted. So in your example, the first calc value field would be if(artikelgroep = 45, 1, 0). The second calc value field if(artikelgroep = 98, 1, 0).
Maybe if you show an example of the schedule you are working with, that would help clarify.
First of all, these are (part of) the families i use:
The code Artikelgroep is used for the blue furniture, artikelgroep1 en artikelgroep2 are used for purple and green. The latter are the same infill-family, but with different parameter values. Hence the 1 and 2. The schedules look like this:
because the right side of the shelving has a different productgroup than the left side i can’t count them in one schedule. But now i need to combine these three schedules so i can see that there are 360instances of group 37 on a stelling_gondola…
You can get the values and then use GroupByKey to group them by similar value. Then just count the length of each group.

