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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
adrian33
Regular Visitor

Columns connecting

Hi,
I don't know how to fix my data. I want to have 2 columns, first with ID number, and second with link.

Now it looks like that:

adrian33_0-1694083958359.png


I want to add "Issue number_1" to the "Issue number" and the same with images.

How can I do this to keep issue number together with image assigned to this?

1 ACCEPTED SOLUTION

This is how you can get it all into one column.

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUcooKSkottLXLy8v10tMStZLzs8FihrhkInViVYyxqnLBI8uU5y6zHDpigUA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [IssueNumber = _t, Image = _t, IssueNumber_1 = _t, Image_1 = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"IssueNumber", Int64.Type}, {"Image", type text}, {"IssueNumber_1", Int64.Type}, {"Image_1", type text}}),
    TableToColumns = Table.ToColumns( #"Changed Type" ),
    IssueNumbers = List.Combine ( { TableToColumns{0}, TableToColumns{2} } ),
    Images = List.Combine ( { TableToColumns{1}, TableToColumns{3} } ),
    ListColumns = { IssueNumbers, Images },
    TableFromColumns = Table.FromColumns ( ListColumns ),
    #"Sorted Rows" = Table.Sort(TableFromColumns,{{"Column1", Order.Ascending}}),
    #"Renamed Columns" = Table.RenameColumns(#"Sorted Rows",{{"Column1", "IssueNumber"}, {"Column2", "Image"}}),
    #"Added Custom" = Table.AddColumn(#"Renamed Columns", "Custom", each "ImageNumber " & Number.ToText ( [IssueNumber] ) & " " & [Image], type text)
in
    #"Added Custom"

jennratten_0-1694091148758.png

 

View solution in original post

5 REPLIES 5
jennratten
Super User
Super User

Hello - are you trying to accomplish something like the image below?  If so, this is how you can do it.  If not, please provide an example of the expected result.

jennratten_0-1694089339291.png

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUcooKSkottLXLy8v10tMStZLzs8FihrhkInViVYyxqnLBI8uU5y6zHDpigUA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [IssueNumber = _t, Image = _t, IssueNumber_1 = _t, Image_1 = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"IssueNumber", Int64.Type}, {"Image", type text}, {"IssueNumber_1", Int64.Type}, {"Image_1", type text}}),
    TableToColumns = Table.ToColumns( #"Changed Type" ),
    IssueNumbers = List.Combine ( { TableToColumns{0}, TableToColumns{2} } ),
    Images = List.Combine ( { TableToColumns{1}, TableToColumns{3} } ),
    ListColumns = { IssueNumbers, Images },
    TableFromColumns = Table.FromColumns ( ListColumns ),
    #"Sorted Rows" = Table.Sort(TableFromColumns,{{"Column1", Order.Ascending}}),
    #"Renamed Columns" = Table.RenameColumns(#"Sorted Rows",{{"Column1", "IssueNumber"}, {"Column2", "Image"}})
in
    #"Renamed Columns"

yes, something like that 🙂

This is how you can get it all into one column.

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUcooKSkottLXLy8v10tMStZLzs8FihrhkInViVYyxqnLBI8uU5y6zHDpigUA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [IssueNumber = _t, Image = _t, IssueNumber_1 = _t, Image_1 = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"IssueNumber", Int64.Type}, {"Image", type text}, {"IssueNumber_1", Int64.Type}, {"Image_1", type text}}),
    TableToColumns = Table.ToColumns( #"Changed Type" ),
    IssueNumbers = List.Combine ( { TableToColumns{0}, TableToColumns{2} } ),
    Images = List.Combine ( { TableToColumns{1}, TableToColumns{3} } ),
    ListColumns = { IssueNumbers, Images },
    TableFromColumns = Table.FromColumns ( ListColumns ),
    #"Sorted Rows" = Table.Sort(TableFromColumns,{{"Column1", Order.Ascending}}),
    #"Renamed Columns" = Table.RenameColumns(#"Sorted Rows",{{"Column1", "IssueNumber"}, {"Column2", "Image"}}),
    #"Added Custom" = Table.AddColumn(#"Renamed Columns", "Custom", each "ImageNumber " & Number.ToText ( [IssueNumber] ) & " " & [Image], type text)
in
    #"Added Custom"

jennratten_0-1694091148758.png

 

mussaenda
Community Champion
Community Champion

Hi @adrian33 ,

 

add means you need the sum per row? like issue + issue 1?

 

No, I mean that I want to have issue 1 in the same column, but as a seperate value.

Something like:
issue x

issue y
issue_1 x
issue z
issue_1 y

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.