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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Lily36876
Helper II
Helper II

Columns Data Reorganization

Hi Guys,

I want to brief product name , all data comes from sql server not csv.

first three columns data is existing in  same table , but product name is too long to show on dashboard,

so I want to reorganizing like follow example,

please help some idea thanks!!

 Lily36876_0-1665980436371.png

 

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

It is for creating a new column.

 

Jihwan_Kim_0-1665981821637.png

 

 

Ideal Type CC =
VAR _newproduct =
    REPLACE ( Data[Product], 1, LEN ( Data[Brand] ), "" )
RETURN
    Data[Short Name] & _newproduct

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

3 REPLIES 3
Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

It is for creating a new column.

 

Jihwan_Kim_0-1665981821637.png

 

 

Ideal Type CC =
VAR _newproduct =
    REPLACE ( Data[Product], 1, LEN ( Data[Brand] ), "" )
RETURN
    Data[Short Name] & _newproduct

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Thanks for reply!! Is really useful for me

Shaurya
Memorable Member
Memorable Member

Hi @Lily36876,

 

Split the text by first occurence of space, change the first part to Upper Case, extract first two characters from it and merge the result with the second part of original string.

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WcsnML1JwTEnJTC5R8MksUHDPyS9Xio0FAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Name = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Name", type text}}),
    #"Split Column by Delimiter" = Table.SplitColumn(#"Changed Type", "Name", Splitter.SplitTextByEachDelimiter({" "}, QuoteStyle.Csv, false), {"Name.1", "Name.2"}),
    #"Changed Type1" = Table.TransformColumnTypes(#"Split Column by Delimiter",{{"Name.1", type text}, {"Name.2", type text}}),
    #"Uppercased Text" = Table.TransformColumns(#"Changed Type1",{{"Name.1", Text.Upper, type text}}),
    #"Added Custom" = Table.AddColumn(#"Uppercased Text", "Custom", each Text.Range([Name.1],0,2)),
    #"Merged Columns" = Table.CombineColumns(#"Added Custom",{"Custom", "Name.2"},Combiner.CombineTextByDelimiter(" ", QuoteStyle.None),"Merged"),
    #"Removed Columns" = Table.RemoveColumns(#"Merged Columns",{"Name.1"})
in
    #"Removed Columns"

 

Works for you? Mark this post as a solution if it does!
Consider taking a look at my blog: Forecast Period - Previous Forecasts

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.