Stair, revit Power BI

Thank you for seeking help! Our friendly community is here to assist you. :pray:

To assist you better, please consider providing:

  • Objective: geting data from stair from revit
  • Issue: Cant get into a Record List
1 Like

Hey @Xavier_Steverlynck welcome to our community!

What parameters are missing, could you please clarify? Is this for a hackathon submission or a separate project?

Thanks!

Hi Mateo, I am new in this area, but the stairs is a headache , I would like to get the parameters that is under materialQuantities that gives me a LIst not a record

1 Like

Hey @Xavier_Steverlynck ,

Welcome to the community! Feel free to Introduce yourself :person_gesturing_ok: to the community if you want to! :grinning:

Please take a look at this thread:

The list has to record as fallows

I would like to get into those records

The List contains to records of informations that has Data that I need

@xavier, I don’t have access to a model with stair and material quantities right now. Can you share a Speckle link to a model with just the stair object you are screenshotting?

1 Like

Hi Xavier!

Could you explain in a bit more detail what is the expected result? Do you want each materialQuantity to be extracted into it’s own column? or just convert the list into a record?

There are several ways to extract lists of data but it really depends on what you expect to do with it :slight_smile:

I will make one to share

1 Like

Small followup:

If the issue you’re having is that you’re not seeing the material data inside each materialQuantity record (like so👇🏼)
image

These objects represent a different element in the speckle database, you will find a row with the same Object ID in the original table that get’s returned by our Data Connector.

Jonathon has written several replies in the past about this, I recommend reading this reply (and the links it contains) to get a better idea of how this is done.

Hope this helps!

Perfect; in the meantime, I have dug one out of the archive.

The trick here is that the Stair materialQuantities materials are detached objects. We have a few examples here on the forum that explain how but in short,

  1. Make one query that filters to all the Stairs, (expand data.category)
    = Table.SelectRows(#"Expanded data", each Text.Contains([data.category], "Stairs"))

  2. Expand the materialQuantities first as a List-> Rows and then Records to properties, you’ll only need the material.referenceId

    e.g. = Table.ExpandRecordColumn(#"Expanded data.materialQuantities1", "data.materialQuantities.material", {"referencedId"}, {"data.materialQuantities.material.referencedId"})

  3. a second query that filters to all the Materials (expand data.category)
    = Table.SelectRows(#"Expanded data", each Text.Contains([speckle_type], "Objects.Other.Material:Objects.Other.Revit.RevitMaterial"))

  4. Expand the data prop of the Materials as far as the material.parameters Record
    = Table.ExpandRecordColumn(#"Filtered Rows", "data - Copy", {"parameters"}, {"material.parameters"})

  5. Add another source by Merge as New
    image

    = Table.NestedJoin(Stairs, {"data.materialQuantities.material.referencedId"}, Materials, {"Object ID"}, "Materials", JoinKind.LeftOuter)

    At this point you have a data table that jins the relevant materials to each stair in the dataset

  6. Use our namespace function Speckle.Revit.Parameters.ToNameValueRecord([Materials.material.parameters])) to make a new custom column

  7. You can now expand that custom column record to reveal whichever of the material properties you wish

You can now use this merged data source to reveal material properties in your dashboard. My model has no value for the KEYNOTE_PARAM but the principle is complete.

I have included the dashboard I made for you; you’ll need to change the single source URL.

Stair Material Properties.pbix (1.8 MB)

2 Likes

Thanks, I will work with it

2 Likes

I have worked with your example in the dashboard that I am making and worked all well thanks you very much for your help.
ReporteBoulevard.pbix (1.4 MB)

Thanks again

3 Likes