Revit Parameters Translation in Power BI - [Brackets] in Names


When I use Speckle.Revit.Parameters.ToNameValueRecord in Power BI, the parameters are “translated” as described in this tutorial Extracting Parameters from Revit Data in Power BI
with the folllowing results:


However, my parameters have these brackets following the name of the parameter, while in the tutorial the result is much cleaner.

For example, instead of Type I get Type [ELEM_TYPE_PARAM}

Is this behaviour normal? Does it have anything to do with the existence of Shared Parameters, or multiple parameters with the same name (but different GUID)?


I believe this covers the fact that the internal names in Revit are always in English, whereas Revit can be running in other languages. This has caused issues in the past, but I am speculating here that we’ve made a change since the tutorial was made.

Is this a blocker for you @Anastasia ?

All columns can be renamed as part of your power query script. Let us know if this is something you think needs fixing.

You mean rename the columns after expanding? I was hoping to rename (and/or filter) the record field names before expanding, for example by dropping the bracket part and adding an integer when duplicates appear, I tried it using Record.RenameFields by using a key-value list, but it takes a lifetime to complete.

This is more of a Power BI than a Speckle issue, unless you have an easy way to tackle this!

I guess expanding the columns first is the simplest way, the only snag is finding the correct names each time, especially for Shared Parameters.

1 Like

This is relatively simple.

If you add a new step in your power query script:

and the formula needed will be

= Table.TransformColumnNames( #"Previous Step", each Text.Trim(Text.BeforeDelimiter(_, "[")))

where Previous Step is whatever it is in your script

or in the advanced editor:

    #"Previous Step" = ....
    RenamedColumns = Table.TransformColumnNames( #"Previous Step", each Text.Trim(Text.BeforeDelimiter(_, "[")))

If you want to do this for just a few columns there will be a more complicated query to perform


That works well! Thank you!


Hey @Anastasia ,

Let me provide more context about why parameters are named this way: In Revit, multiple parameters can have the same user-facing name. Therefore, we attach the internal API name at the end to accommodate this scenario. As suggested by @jonathon, you can remove them with a single function, but ensure that it doesn’t cause any issues. As I mentioned earlier, multiple parameters can have the same name.