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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
mcaop-21
New Member

Tabular Editor Scripting for SortbyColumn

I have a common date dimension I want to use in multiple models so had scripted out setting model properties.

 

Basic properties seem to work well.

 

Model.Tables["Date"].Columns["MonthEndingSaturday"].FormatString = "m/d/yyyy"; Model.Tables["Date"].Columns["MonthEndingSaturday"].DisplayFolder = "MonthEnd Saturday"; Model.Tables["Date"].Columns["MonthEndingSaturday"].Description = "Date of the last Saturday of the month";

However, I can't seem to get the SortbyColumn to stick.

 

Model.Tables["Date"].Columns["Quarter-Year (yyyy-qq)"].SortByColumn = Model.Tables["Date"].Columns["YearQuarterNumber"];

Any thoughts on how to get these to work? I do not get any error and according to the docs, it should work. Oddly enough, I don't even see this property in the Tabular Editor column properties?!?

 

Any help is greatly appreciated.

Thanks

 

 

 

 

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @mcaop-21 

If you enable the “Allow unsupported Power BI features (experimental)” option under Tabular Editor’s File > Preferences > Features, you will be able to see the Sort By Column property in column properties. Based on my test, this property setting is able to be applied to Power BI Desktop.

032601.jpg

 

Kindly let me know if this helps.
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.

View solution in original post

1 REPLY 1
v-jingzhang
Community Support
Community Support

Hi @mcaop-21 

If you enable the “Allow unsupported Power BI features (experimental)” option under Tabular Editor’s File > Preferences > Features, you will be able to see the Sort By Column property in column properties. Based on my test, this property setting is able to be applied to Power BI Desktop.

032601.jpg

 

Kindly let me know if this helps.
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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