Forum Discussion
Sean
Community Champion
9 years agoList ALL Calculated COLUMNS in a Data Model
Does anyone know how to get a List of all Calculated COLUMNS in a Data Model? Very easily done if you have a PowerPivot Model using the Power Pivot Utilities - Tool Dax Studio gets me all th...
Phil_Seamark
Microsoft Employee
9 years agoIf I run the following
select * from $SYSTEM.TMSCHEMA_COLUMNS
I get info on all columns, including formulas used in the [Expression] column which is pretty cool.
Perhaps filter to Type = 2?
Phil_Seamark
Microsoft Employee
9 years agoSo just playing around with this a bit more
This seems to give me all calcuated columns including the forumla as well as cool info like the 'sort by column' (leave off the where clause if you want to see/document info about all your columns).
select * from $SYSTEM.TMSCHEMA_COLUMNS where [Type] = 2;
and for calculated measures
select * from $SYSTEM.TMSCHEMA_MEASURES