Revit Parts Quantities Exceeds Actual Total in Power BI


Hello again
You will know the reason why when I want to divide the element into more pieces and export to power bi I get a larger quantity (look at the image)

Hey @joel_balvin ,

This is very interesting. Can you please share the Speckle Model URL with me? Also, are you extracting the volume parameter from the parameters object? Or are you using the top level volume attribute?

Hello
I share with you the model and the image from which I am extracting the parameter. thanks for the support.

https://speckle.xyz/streams/b28d311f02/commits/8539728bfb

Hey @joel_balvin ,

Can you please share the Revit file too? We need to compare it with the Revit data.

EJEMPLO REVIT 2022.rvt (6.4 MB)
Attach the file.
greetings

As I mentioned, the problem arises when I keep dividing the pieces.

Hey @joel_balvin ,

Thanks for sharing the file! It helped me find what’s going on.

What you are seeing is happening due to how Revit structures Part objects. As you know, you can relate parts back to their parent element and that is due to that relationship is still kept in Revit’s programming interface level. We are using Revit’s programming interface (API) to extract all elements as well as their parameters. And we are preserving the structure we get from the Revit API.

In this case, parts are represented at two levels: first, you get the whole element, then its sub-elements, both of which have the Volume parameter set. This results in duplicates being created. Therefore, we need to exclude the parent elements.

Parent elements have a key called “@elements” which stores the sub elements in it. If we exclude elements that has this field, then we will only have parts. You can do this by using Record.HasField([data], #"@elements"). This will return TRUE if the element has the field we are looking for. If it doesn’t, it will return FALSE. After doing these, we can filter only the FALSE rows.

Alternative Approach

If you find it difficult to understand the object structure that comes from Revit, there is a simpler approach you can try. You can export a schedule as an Excel file and import it into Power BI. Then you can link it back to your Revit data using Element ID field. It’s important to include the Element ID field in the schedule so you can utilize it to link it with your Speckle data. This way you can still use our 3D Viewer Visual in combination with any data.

:clap: Great, excellent, perfect, I managed to do it according to your guide and it came out correct. Thank you so much!!

1 Like