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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
driley916
Regular Visitor

Headers show hardcode with #(if)

When I expand my data I notice my headers in the formula bar show #(if) before each word. I transposed the headers and some looked stacked. Trim doesnt work but if I go into the header and hit backspace that corrects it. I think the #(if) may represent Shift+Enter ? The Solution is to use the "Clean" within the transform menu.

driley916_0-1713303230149.png

driley916_1-1713303299666.png

 

2 ACCEPTED SOLUTIONS
lbendlin
Super User
Super User

that's not #(if) but #(lf) for "line feed".  You need to clean your data.

View solution in original post

AlienSx
Super User
Super User

you need to get the list of column names, clean it and rename columns of your original table using this new list. 

names = Table.ColumnNames(your_table),
clean_names = List.Transform(names, each Text.Replace(Text.Trim(_, "#(lf)"), "#(lf)", " ")),
renames = Table.RenameColumns(your_table, List.Zip({names, clean_names}))

View solution in original post

2 REPLIES 2
AlienSx
Super User
Super User

you need to get the list of column names, clean it and rename columns of your original table using this new list. 

names = Table.ColumnNames(your_table),
clean_names = List.Transform(names, each Text.Replace(Text.Trim(_, "#(lf)"), "#(lf)", " ")),
renames = Table.RenameColumns(your_table, List.Zip({names, clean_names}))
lbendlin
Super User
Super User

that's not #(if) but #(lf) for "line feed".  You need to clean your data.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.

Top Solution Authors
Top Kudoed Authors