Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

tabular editor 3 script change names and field references

I work on a product that requires changes to the table, field, calculated column, measure and reference names when deployed in different geographies.

 

e.g. in the UK we use the term "Binder" and in the US we use the term "Program".

 

I have a table that contains for each geography, a pair of values "Old" and "New" in two seperate columns, that determine one of the terminology transformations required for that geography.

 

I am trying to script in C# with TE3, a means by which the user can choose the geography, and the script can cycle/iterate through each terminology conversion pair in the Terminology table, making the conversion from "Old" to "New". Below is what I have so far:

taurusbi_0-1669269632175.png

 

Any ideas on this! It seems that I cannot set the "FromString" and "ToString" values using the Model.Tables[] funnciton nor can I use Table.Rows[] function.

 

Cheers

 

2 REPLIES 2
Anonymous
Not applicable

HI @Anonymous,

In my opinion, I suppose these requirement not suitable to use scripts force changed in tabular editor. I think it will better to add a mapping table in your data model with different term mappings. (e.g. raw, locale, translate)

In addition, if you mean to autofit the visual layout and volume unit change based on locale, I'd like to suggest you submit idea or try to contact power bi locale team to help improve the visual usage.

Regards,

Xiaoxin Sheng

Anonymous
Not applicable

Hi Xiaoxin,

 

Power BI uses a named reference architecture to refer to other fields/objects etc, rather than some underlying object identifier with a named alias. This is why I have chosen to forceably change the named references in bulk with TE3.

 

I have a mapping table with my Old, New values - what I am trying to achieve is to utilise these mappings as an input to the bulk editing C# scripting functionality of TE3. This is the only way that I can see to change references within measures to other fields, column names and table names etc.

 

I understand that this requirement is mis-aligned with the underlying architecture of Power BI and therefore an idea will fall on deaf ears (as I have seen it do so across other community posts)

 

Cheers 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.