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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Mooihoek
Helper II
Helper II

Spilt Column and create New Row

I'm trying to spilt the U from this column and then have that value as a new Column called Test which then have that value and on the same row as the other values, e.g in green. .  Any ideas on how to achieve this?

 

Mooihoek_2-1629354853944.png

 

 

1 ACCEPTED SOLUTION

thats it I now have the data load the way I need, your awesome! @v-yalanwu-msft 

View solution in original post

11 REPLIES 11
v-yalanwu-msft
Community Support
Community Support

Hi, @Mooihoek ;

You could modify it as follows:

1.custom column in power query

vyalanwumsft_0-1630045390941.png

2.add conditional column

vyalanwumsft_1-1630045440949.png

3.remove custom column and fill up custom1 coulmn

vyalanwumsft_2-1630045498312.png

4.split column

vyalanwumsft_3-1630045527844.png

5.remove empty rows

vyalanwumsft_4-1630045565676.png

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WUtIBofw0Bdey1LwSpVidaCVDQxNLU0OgqJG5voGJvpGBEZgDpHQtdA3NwWpCIfrM3u+ZZWwc4KsUGwsA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Case Number" = _t, #"Date Submitted" = _t, #"Date/Time" = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Case Number", type text}, {"Date Submitted", type date}}),
    Custom1 = Table.AddColumn(#"Changed Type", "Custom", each Text.Select([Case Number],{"A".."z"})&"|"&[#"Date/Time"]),
    #"Added Conditional Column" = Table.AddColumn(Custom1, "Custom.1", each if Text.StartsWith([Custom], "|") then null else [Custom]),
    #"Removed Columns" = Table.RemoveColumns(#"Added Conditional Column",{"Custom"}),
    #"Filled Up" = Table.FillUp(#"Removed Columns",{"Custom.1"}),
    #"Split Column by Delimiter" = Table.SplitColumn(#"Filled Up", "Custom.1", Splitter.SplitTextByDelimiter("|", QuoteStyle.Csv), {"Custom.1.1", "Custom.1.2"}),
    #"Changed Type1" = Table.TransformColumnTypes(#"Split Column by Delimiter",{{"Date/Time", type text}, {"Custom.1.1", type text}, {"Custom.1.2", type text}}),
    #"Filtered Rows" = Table.SelectRows(#"Changed Type1", each [Date Submitted] <> null and [Date Submitted] <> "")
in
    #"Filtered Rows"

The final output is shown below:

vyalanwumsft_5-1630045608794.png

Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

thanks Yalan Wu, at 2.add conditional column I do not get an option to select "begins with' only equals or does not equal are available.

Mooihoek_0-1630049490700.png

 

 

Hi, @Mooihoek ;

There is a drop-down box to choose.

vyalanwumsft_0-1630050670052.png

Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

thats it I now have the data load the way I need, your awesome! @v-yalanwu-msft 

v-yalanwu-msft
Community Support
Community Support

Hi, @Mooihoek ; 

Hi, according to your description, there is another method you can try:

1.add custom column in power query

vyalanwumsft_0-1629962613416.png

2.replace value (""->"null")

vyalanwumsft_1-1629962690771.png

3.fill up

vyalanwumsft_2-1629962746510.png

4.remove empty rows

vyalanwumsft_3-1629962781553.png

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WUtJRUorViVYyNDSxNDUE8ozM9Q1M9I0MjAzB4qFgBbEA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Case Number" = _t, #"Date Submitted" = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Case Number", type text}, {"Date Submitted", type date}}),
    Custom1 = Table.AddColumn(#"Changed Type", "Custom", each Text.Select([Case Number],{"A".."z"})),
    #"Replaced Value" = Table.ReplaceValue(Custom1,"",null,Replacer.ReplaceValue,{"Custom"}),
    #"Filled Up" = Table.FillUp(#"Replaced Value",{"Custom"}),
    #"Filtered Rows" = Table.SelectRows(#"Filled Up", each [Date Submitted] <> null and [Date Submitted] <> "")
in
    #"Filtered Rows"

The final output is shown below:

vyalanwumsft_4-1629962823617.png

Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

thanks I also need to move the date time value as well and create a new  Column called Time, is he code the same?

 

Mooihoek_0-1629964778694.png

 

mussaenda
Super User
Super User

Hi @Mooihoek ,

 
 
 
 
 

try this on a blank query

 

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WUtJRUorViVYyNDSxNDUE8ozM9Q1M9I0MjAzB4qFgBbEA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Case Number" = _t, #"Date Submitted" = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Case Number", type text}, {"Date Submitted", type date}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each #"Changed Type"{2}[Case Number]),
    #"Filtered Rows" = Table.SelectRows(#"Added Custom", each [Date Submitted] <> null and [Date Submitted] <> "")
in
    #"Filtered Rows"

 

 

 

Hope this helps

This is where I'm at, Created two new columns Type &Time however those values need to come up a row.

 

Mooihoek_0-1629970911166.png

 

Because there's an error there on the top row it won't let me complete a Fill Up then filter the columns, any thoughts?

thanks cant get it working using an existing data source. Can I send you the BI file for checking?

Hi @Mooihoek ,

 

I put the query on your file.

 

Thanks.

Hope this helps.

thanks this is good, question I have through is can't that change be made to the main Aus query as I need all the other columns as well so that the data is complete

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Kudoed Authors