cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CameronKudos
Helper I
Helper I

Can the rows with text be lined up?

***EDIT***

I figured it out. Thanks anyway if you were trying.

 

Hi people, 

 

Hoping one of you genuises can help. I need to make it so all the text lines up. So there should be no 'nulls' but no text should be deleted.

CameronKudos_0-1653824715070.png

 

1 ACCEPTED SOLUTION
v-yingjl
Community Support
Community Support

Hi @CameronKudos ,

If you want to create a new column to combine all the text values, you can try this query:

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUXIEYiDyU4rViVYygnAiQBSIbwzhA5EHmG8CZDlDxUB8Uwg7EsY3g6v3BfPN4Xww1wLIcAXiKJiAJZDhBlHgBBYwNAAzoVpiAQ==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Index = _t, Column1 = _t, Column2 = _t, Column3 = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Index", Int64.Type}, {"Column1", type text}, {"Column2", type text}, {"Column3", type text}}),
    #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"Index"}, "Attribute", "Value"),
    #"Filtered Rows" = Table.SelectRows(#"Unpivoted Other Columns", each ([Value] <> "")),
    #"Added Custom" = Table.AddColumn(#"Filtered Rows", "Custom", each #"Filtered Rows"[Value]),
    #"Extracted Values" = Table.TransformColumns(#"Added Custom", {"Custom", each Text.Combine(List.Transform(_, Text.From), ","), type text})
in
    #"Extracted Values"

vyingjl_0-1654053174374.pngvyingjl_1-1654053190812.png

 

 

If it is not your expected output, you can share more details about it.

Sample data and expected output would help tremendously.
Please see this post regarding How to Get Your Question Answered Quickly:
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

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

View solution in original post

2 REPLIES 2
v-yingjl
Community Support
Community Support

Hi @CameronKudos ,

If you want to create a new column to combine all the text values, you can try this query:

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUXIEYiDyU4rViVYygnAiQBSIbwzhA5EHmG8CZDlDxUB8Uwg7EsY3g6v3BfPN4Xww1wLIcAXiKJiAJZDhBlHgBBYwNAAzoVpiAQ==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Index = _t, Column1 = _t, Column2 = _t, Column3 = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Index", Int64.Type}, {"Column1", type text}, {"Column2", type text}, {"Column3", type text}}),
    #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"Index"}, "Attribute", "Value"),
    #"Filtered Rows" = Table.SelectRows(#"Unpivoted Other Columns", each ([Value] <> "")),
    #"Added Custom" = Table.AddColumn(#"Filtered Rows", "Custom", each #"Filtered Rows"[Value]),
    #"Extracted Values" = Table.TransformColumns(#"Added Custom", {"Custom", each Text.Combine(List.Transform(_, Text.From), ","), type text})
in
    #"Extracted Values"

vyingjl_0-1654053174374.pngvyingjl_1-1654053190812.png

 

 

If it is not your expected output, you can share more details about it.

Sample data and expected output would help tremendously.
Please see this post regarding How to Get Your Question Answered Quickly:
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

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

KT_Bsmart2gethe
Super User
Super User

HI @CameronKudos ,

 

If would be great if there are sample data available. It can be done in another way to achieve your desired outcome.

 

If not, based on screenshot, you can fill down all columns except the last one (i.e. Time spent travelling ...), then apply filter on the last column <> null.

 

Regards

KT

Helpful resources

Announcements
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

BizApps LATAM 2023

Business Application LATAM Summit 2023

Join the biggest FREE Business Applications Event in LATAM this February.

Power Platform Bootcamp

Global Power Platform Bootcamp

In this bootcamp we will deep-dive into Microsoft’s Power Platform stack with hands-on sessions and labs, delivered to you by experts and community leaders.

Top Solution Authors
Top Kudoed Authors