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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
taurusbi
Frequent Visitor

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
v-shex-msft
Community Support
Community Support

HI @taurusbi,

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.