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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
THENNA_41
Post Partisan
Post Partisan

Getting blank values after the split by column delimiter

Hi Team, i have the following data table .  

 

Month                    parameter                           Index 

April              TAR LOW,SN HIGH,                          5

March              SN HIGH,CO HIGH,                      15

May                      CO LOW,                                 35

 

 above table parameter column i did the   have split column by Delimiter . please find the below screen shot reference 

 

THENNA_41_0-1644408425407.png

 

after done this . i am getting  below output.

Month                    parameter                           Index 

April                         TAR LOW                            5
April                         SN HIGH                            5
April                                                                    5

March                     SN HIGH                            15
March                     CO HIGH                            15
March                                                                15

May                      CO LOW                                35
May                                                                   35

 

i am getting everyrow duplicate blank row. how it will resolved . thanks in advance.

1 ACCEPTED SOLUTION
HotChilli
Super User
Super User

You have many options. (remove the last character of parameter column with a formula etc.)

 

The simplest would be to filter the blank values out (do this from the dropdown at the top of the column) after the split

View solution in original post

4 REPLIES 4
goncalogeraldes
Super User
Super User

Hello there @THENNA_41 ! Why not just filter out the blank rows? You dont seem to lose information if you do so...

 

let
    Source = Excel.Workbook(File.Contents("C:\Users\Book1.xlsx"), null, true),
    Table1_Table = Source{[Item="Table1",Kind="Table"]}[Data],
    Trim_Text = Table.TransformColumns(Table1_Table,{{"parameter", Text.Trim, type text}}),
    Split_Column_Comma = Table.ExpandListColumn(
        Table.TransformColumns(
            Trim_Text, 
            {{"parameter", Splitter.SplitTextByDelimiter(",", QuoteStyle.Csv), 
                let itemType = (type nullable text) meta [Serialized.Text = true] 
                in type {itemType}}}), 
            "parameter"),
    Filter_Blanks = Table.SelectRows(Split_Column_Comma, each ([parameter] <> ""))
in
    Filter_Blanks

 

Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudoe 👍
Thanks!

You can also check out my LinkedIn!

Best regards,
Gonçalo Geraldes

HotChilli
Super User
Super User

You have many options. (remove the last character of parameter column with a formula etc.)

 

The simplest would be to filter the blank values out (do this from the dropdown at the top of the column) after the split

@HotChilli  thanks i did the same . i filter the blank value

Aditya_Meshram
Solution Supplier
Solution Supplier

 

From what we can see, it seems that your column has been split by rows and each split part was placed into a different row causing duplicates and due to the trailing comma, you are getting a blank row.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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