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
rng
Frequent Visitor

Is there an option to remove dimension name in front of column name

I'm using import data from the Analysis Services. Is there an option to not show the dimension in front of the column name on my tabular table, without manually changing the column name?

 

e.g. a column call age description in age dimension will give me 'Age.Age Description' column name. I would like to have just Age Description for that column will do

11 REPLIES 11
Stachu
Community Champion
Community Champion

I think @GilbertQ is referring to Expand Column checkbox, which to my knowledge is not available in case of extracting from Analysis Services
As for the name changing - you can rename the columns by double clicking on them. It doesn't break query folding, so afterwards you should still be able to add new dimensions, measures etc.

EDIT - spelling



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

rng
Frequent Visitor

I suspected that could be the case that i need to manually change the 50-60 of columns. Thanks for the helps, guys.

 Hi @rng,

 

Have you solved your problem? If you have solved, only thing that you'll have to notice, just always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

 

If you still need help, please feel free to ask.

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello,

 

I'm having the same problem and I just can't rename the columns one by one (there are hundreds of them!). Anyone here can help? Thank you.

Hi there

I explain how to do this in Power Query in my blog post https://www.fourmoo.com/2018/05/15/power-query-renaming-multiple-columns/




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Stachu
Community Champion
Community Champion

well, the Analysis Services columns follow naming convention Dimension.Field, you will probably have multiple Dimensions as a prefix

So you could:
1) use Table.ColumnNames to get the list of current names,
2) transform it to table,

3) find which character the first '.' is (Text.PositionOf)
4) use Text.Middle to create a new name based on the old one,

5) create a new column which would be list of old & new name = {[oldName],[newName]}
6) reference that column as list of list that can be used in Table.RenameColumns

advantage is it always rename automatically

disadvantage is it will be probably quicker to do it manually, but you may have issues when you add/remove columns



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Hi there,

 

You could use the following code below in the Advanced Editor of Power Query Editor if all the columns start with the same prefix

 

#"Rename Column Names" = Table.TransformColumnNames(#"Changed Type", (columnName as text) as text => Text.Replace(columnName, "Flotation", "TAR"))

What you will need to change is the last 2 values.

Where it says "Flotation" this is what you are searching for.

Where it says "TAR" this is what you want to replace it with. In your example I would replace it with "" (A blank Value)





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

GilbertQ
Super User
Super User

Hi there, when you bring it in, there is an option to de-select "Use Original Column Prefix"




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

rng
Frequent Visitor

Sorry i am feeling dumb here. I could't find that option, can i have some print screen or path to get to that option? Thanks.

rng
Frequent Visitor

This is what i see in the drop downThis is what i see in the drop down

Hi @rng

 

On the step where you expand the table, there is the option to un-tick Use Original column name as prefix

 

image.png





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

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.