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
sustainhort
Frequent Visitor

Splitting Column into Rows Blank Value Affects Realtionship

 am hoping someone can help, i have split a Column into Rows and the values (text) are showing up as blanks in a new row, the original first row has the value showing. It is also creating an additional row with no value, basically an extra row. I need and have a relations hip formed although as the first row has only the value showing it is showing only the products related to this. I have set the data to show items with no data.

 

 

sustainhort_0-1658186580481.png

 

1 ACCEPTED SOLUTION

You've got carriage return and line feed characters in your data. 

 

KNP_0-1658201280001.png

 

That will be causing you issues in your split.

Go back to the step BEFORE the split, right click on the column and choose 'Transform' and 'Clean'.

This should remove any unnecessary white space.

 

KNP_1-1658201360629.png

 

Hopefully this will prevent what appears to be blank rows.

 

 

 

 

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
chrome-9xf-Zagzel-B

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x

View solution in original post

13 REPLIES 13
KNP
Super User
Super User

Can you please provide some sample data and Power Query code?

It is too difficult to solve with the detail provided.

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
chrome-9xf-Zagzel-B

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x

sustainhort_0-1658187746073.png

does this assist?

 

Not really. Something that I don't have to re-type.

Just copy/paste data, not screenshot, and also copy/paste PQ code from the advanced editor (obfuscate any sensitive info). 

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
chrome-9xf-Zagzel-B

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x

DateActionNext ScheduledConsultantFarm NameCrop StageCrop TypeChemistry Recommended

Jul 18, 2022 01:00 PMTreatment RequiredGeorgina Gill

Mark Duncan

Marcus Lullham
Byrne - DalwoodPre Flower

Open Flower
MacadamiaCopper oxychloride,
Phosphoric Acid,
Carbendazim,
Jul 18, 2022 03:00 PMTreatment RequiredAug 1, 2022John Hay

Andy Cameron
Byrne - Richmond HillPre Flower

Open Flower
MacadamiaMethoxyfenozide,

Carbendazim,

Copper Hydroxide,

 

 

let
Source = Excel.Workbook(File.Contents("C:\Users\sscau\OneDrive\Documents\OneDrive\GROWER FILES\Duncan Macadamia John\Duncan Macadamia.xlsx"), null, true),
#"Pest Monitoring Form_Sheet" = Source{[Item="Pest Monitoring Form",Kind="Sheet"]}[Data],
#"Promoted Headers" = Table.PromoteHeaders(#"Pest Monitoring Form_Sheet", [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Submission Date", type datetime}, {"Pest Record Number Identified >> Lace bug Nymph >> Zone 1", Int64.Type}, {"Pest Record Number Identified >> Lace bug Nymph >> Zone 2", Int64.Type}, {"Pest Record Number Identified >> Lace bug Nymph >> Zone 3", Int64.Type}, {"Pest Record Number Identified >> Lace bug Nymph >> Zone 4", Int64.Type}, {"Pest Record Number Identified >> Lace bug Nymph >> Zone 5", Int64.Type}, {"Pest Record Number Identified >> Lace bug Nymph >> Zone 6", Int64.Type}, {"Pest Record Number Identified >> Lace Bug Juvenille >> Zone 1", Int64.Type}, {"Pest Record Number Identified >> Lace Bug Juvenille >> Zone 2", Int64.Type}, {"Pest Record Number Identified >> Lace Bug Juvenille >> Zone 3", Int64.Type}, {"Pest Record Number Identified >> Lace Bug Juvenille >> Zone 4", Int64.Type}, {"Pest Record Number Identified >> Lace Bug Juvenille >> Zone 5", Int64.Type}, {"Pest Record Number Identified >> Lace Bug Juvenille >> Zone 6", Int64.Type}, {"Pest Record Number Identified >> Lace Bug Adult >> Zone 1", Int64.Type}, {"Pest Record Number Identified >> Lace Bug Adult >> Zone 2", Int64.Type}, {"Pest Record Number Identified >> Lace Bug Adult >> Zone 3", Int64.Type}, {"Pest Record Number Identified >> Lace Bug Adult >> Zone 4", Int64.Type}, {"Pest Record Number Identified >> Lace Bug Adult >> Zone 5", Int64.Type}, {"Pest Record Number Identified >> Lace Bug Adult >> Zone 6", Int64.Type}, {"Pest Record Number Identified >> Aphids >> Zone 1", Int64.Type}, {"Pest Record Number Identified >> Aphids >> Zone 2", Int64.Type}, {"Pest Record Number Identified >> Aphids >> Zone 3", Int64.Type}, {"Pest Record Number Identified >> Aphids >> Zone 4", Int64.Type}, {"Pest Record Number Identified >> Aphids >> Zone 5", Int64.Type}, {"Pest Record Number Identified >> Aphids >> Zone 6", Int64.Type}, {"Pest Record Number Identified >> Broadmite >> Zone 1", Int64.Type}, {"Pest Record Number Identified >> Broadmite >> Zone 2", Int64.Type}, {"Pest Record Number Identified >> Broadmite >> Zone 3", Int64.Type}, {"Pest Record Number Identified >> Broadmite >> Zone 4", Int64.Type}, {"Pest Record Number Identified >> Broadmite >> Zone 5", Int64.Type}, {"Pest Record Number Identified >> Broadmite >> Zone 6", Int64.Type}, {"Pest Record Number Identified >> Feltid Coccid >> Zone 1", Int64.Type}, {"Pest Record Number Identified >> Feltid Coccid >> Zone 2", Int64.Type}, {"Pest Record Number Identified >> Feltid Coccid >> Zone 3", Int64.Type}, {"Pest Record Number Identified >> Feltid Coccid >> Zone 4", Int64.Type}, {"Pest Record Number Identified >> Feltid Coccid >> Zone 5", Int64.Type}, {"Pest Record Number Identified >> Feltid Coccid >> Zone 6", Int64.Type}, {"Pest Record Number Identified >> Fruit Spotting Bug >> Zone 1", Int64.Type}, {"Pest Record Number Identified >> Fruit Spotting Bug >> Zone 2", Int64.Type}, {"Pest Record Number Identified >> Fruit Spotting Bug >> Zone 3", Int64.Type}, {"Pest Record Number Identified >> Fruit Spotting Bug >> Zone 4", Int64.Type}, {"Pest Record Number Identified >> Fruit Spotting Bug >> Zone 5", Int64.Type}, {"Pest Record Number Identified >> Fruit Spotting Bug >> Zone 6", Int64.Type}, {"Pest Record Number Identified >> Green Vege Bug >> Zone 1", Int64.Type}, {"Pest Record Number Identified >> Green Vege Bug >> Zone 2", Int64.Type}, {"Pest Record Number Identified >> Green Vege Bug >> Zone 3", Int64.Type}, {"Pest Record Number Identified >> Green Vege Bug >> Zone 4", Int64.Type}, {"Pest Record Number Identified >> Green Vege Bug >> Zone 5", Int64.Type}, {"Pest Record Number Identified >> Green Vege Bug >> Zone 6", Int64.Type}, {"Pest Record Number Identified >> Thrips >> Zone 1", Int64.Type}, {"Pest Record Number Identified >> Thrips >> Zone 2", Int64.Type}, {"Pest Record Number Identified >> Thrips >> Zone 3", Int64.Type}, {"Pest Record Number Identified >> Thrips >> Zone 4", Int64.Type}, {"Pest Record Number Identified >> Thrips >> Zone 5", Int64.Type}, {"Pest Record Number Identified >> Thrips >> Zone 6", Int64.Type}, {"Pest Record Number Identified >> Mealy Bug >> Zone 1", Int64.Type}, {"Pest Record Number Identified >> Mealy Bug >> Zone 2", Int64.Type}, {"Pest Record Number Identified >> Mealy Bug >> Zone 3", Int64.Type}, {"Pest Record Number Identified >> Mealy Bug >> Zone 4", Int64.Type}, {"Pest Record Number Identified >> Mealy Bug >> Zone 5", Int64.Type}, {"Pest Record Number Identified >> Mealy Bug >> Zone 6", Int64.Type}, {"Pest Record Number Identified >> Macadamia Seed Weevil >> Zone 1", Int64.Type}, {"Pest Record Number Identified >> Macadamia Seed Weevil >> Zone 2", Int64.Type}, {"Pest Record Number Identified >> Macadamia Seed Weevil >> Zone 3", Int64.Type}, {"Pest Record Number Identified >> Macadamia Seed Weevil >> Zone 4", Int64.Type}, {"Pest Record Number Identified >> Macadamia Seed Weevil >> Zone 5", Int64.Type}, {"Pest Record Number Identified >> Macadamia Seed Weevil >> Zone 6", Int64.Type}, {"Pest Record Number Identified >> Bark Beetle >> Zone 1", Int64.Type}, {"Pest Record Number Identified >> Bark Beetle >> Zone 2", Int64.Type}, {"Pest Record Number Identified >> Bark Beetle >> Zone 3", Int64.Type}, {"Pest Record Number Identified >> Bark Beetle >> Zone 4", Int64.Type}, {"Pest Record Number Identified >> Bark Beetle >> Zone 5", Int64.Type}, {"Pest Record Number Identified >> Bark Beetle >> Zone 6", Int64.Type}, {"Pest Record Number Identified >> Flower Catepillar >> Zone 1", Int64.Type}, {"Pest Record Number Identified >> Flower Catepillar >> Zone 2", Int64.Type}, {"Pest Record Number Identified >> Flower Catepillar >> Zone 3", Int64.Type}, {"Pest Record Number Identified >> Flower Catepillar >> Zone 4", Int64.Type}, {"Pest Record Number Identified >> Flower Catepillar >> Zone 5", Int64.Type}, {"Pest Record Number Identified >> Flower Catepillar >> Zone 6", Int64.Type}, {"Pest Record Number Identified >> Looper >> Zone 1", Int64.Type}, {"Pest Record Number Identified >> Looper >> Zone 2", Int64.Type}, {"Pest Record Number Identified >> Looper >> Zone 3", Int64.Type}, {"Pest Record Number Identified >> Looper >> Zone 4", Int64.Type}, {"Pest Record Number Identified >> Looper >> Zone 5", Int64.Type}, {"Pest Record Number Identified >> Looper >> Zone 6", Int64.Type}, {"Pest Record Number Identified >> Rat % Nut Damage >> Zone 1", Int64.Type}, {"Pest Record Number Identified >> Rat % Nut Damage >> Zone 2", Int64.Type}, {"Pest Record Number Identified >> Rat % Nut Damage >> Zone 3", Int64.Type}, {"Pest Record Number Identified >> Rat % Nut Damage >> Zone 4", Int64.Type}, {"Pest Record Number Identified >> Rat % Nut Damage >> Zone 5", Int64.Type}, {"Pest Record Number Identified >> Rat % Nut Damage >> Zone 6", Int64.Type}, {"Pest Record Number Identified >> Cockatoos >> Zone 1", Int64.Type}, {"Pest Record Number Identified >> Cockatoos >> Zone 2", Int64.Type}, {"Pest Record Number Identified >> Cockatoos >> Zone 3", Int64.Type}, {"Pest Record Number Identified >> Cockatoos >> Zone 4", Int64.Type}, {"Pest Record Number Identified >> Cockatoos >> Zone 5", Int64.Type}, {"Pest Record Number Identified >> Cockatoos >> Zone 6", Int64.Type}, {"Disease Severity % of Flower/Fruits/Nuts Affected >> Anthracnose >> Zone 1", Int64.Type}, {"Disease Severity % of Flower/Fruits/Nuts Affected >> Anthracnose >> Zone 2", Int64.Type}, {"Disease Severity % of Flower/Fruits/Nuts Affected >> Anthracnose >> Zone 3", Int64.Type}, {"Disease Severity % of Flower/Fruits/Nuts Affected >> Anthracnose >> Zone 4", Int64.Type}, {"Disease Severity % of Flower/Fruits/Nuts Affected >> Anthracnose >> Zone 5", Int64.Type}, {"Disease Severity % of Flower/Fruits/Nuts Affected >> Anthracnose >> Zone 6", Int64.Type}, {"Disease Severity % of Flower/Fruits/Nuts Affected >> Botrytis >> Zone 1", Int64.Type}, {"Disease Severity % of Flower/Fruits/Nuts Affected >> Botrytis >> Zone 2", Int64.Type}, {"Disease Severity % of Flower/Fruits/Nuts Affected >> Botrytis >> Zone 3", Int64.Type}, {"Disease Severity % of Flower/Fruits/Nuts Affected >> Botrytis >> Zone 4", Int64.Type}, {"Disease Severity % of Flower/Fruits/Nuts Affected >> Botrytis >> Zone 5", Int64.Type}, {"Disease Severity % of Flower/Fruits/Nuts Affected >> Botrytis >> Zone 6", Int64.Type}, {"Disease Severity % of Flower/Fruits/Nuts Affected >> Branch Dieback >> Zone 1", Int64.Type}, {"Disease Severity % of Flower/Fruits/Nuts Affected >> Branch Dieback >> Zone 2", Int64.Type}, {"Disease Severity % of Flower/Fruits/Nuts Affected >> Branch Dieback >> Zone 3", Int64.Type}, {"Disease Severity % of Flower/Fruits/Nuts Affected >> Branch Dieback >> Zone 4", Int64.Type}, {"Disease Severity % of Flower/Fruits/Nuts Affected >> Branch Dieback >> Zone 5", Int64.Type}, {"Disease Severity % of Flower/Fruits/Nuts Affected >> Branch Dieback >> Zone 6", Int64.Type}, {"Disease Severity % of Flower/Fruits/Nuts Affected >> Husk Spot >> Zone 1", Int64.Type}, {"Disease Severity % of Flower/Fruits/Nuts Affected >> Husk Spot >> Zone 2", Int64.Type}, {"Disease Severity % of Flower/Fruits/Nuts Affected >> Husk Spot >> Zone 3", Int64.Type}, {"Disease Severity % of Flower/Fruits/Nuts Affected >> Husk Spot >> Zone 4", Int64.Type}, {"Disease Severity % of Flower/Fruits/Nuts Affected >> Husk Spot >> Zone 5", Int64.Type}, {"Disease Severity % of Flower/Fruits/Nuts Affected >> Husk Spot >> Zone 6", Int64.Type}, {"Disease Severity % of Flower/Fruits/Nuts Affected >> Husk Rot >> Zone 1", Int64.Type}, {"Disease Severity % of Flower/Fruits/Nuts Affected >> Husk Rot >> Zone 2", Int64.Type}, {"Disease Severity % of Flower/Fruits/Nuts Affected >> Husk Rot >> Zone 3", Int64.Type}, {"Disease Severity % of Flower/Fruits/Nuts Affected >> Husk Rot >> Zone 4", Int64.Type}, {"Disease Severity % of Flower/Fruits/Nuts Affected >> Husk Rot >> Zone 5", Int64.Type}, {"Disease Severity % of Flower/Fruits/Nuts Affected >> Husk Rot >> Zone 6", Int64.Type}, {"Disease Severity % of Flower/Fruits/Nuts Affected >> Phytophtora >> Zone 1", Int64.Type}, {"Disease Severity % of Flower/Fruits/Nuts Affected >> Phytophtora >> Zone 2", Int64.Type}, {"Disease Severity % of Flower/Fruits/Nuts Affected >> Phytophtora >> Zone 3", Int64.Type}, {"Disease Severity % of Flower/Fruits/Nuts Affected >> Phytophtora >> Zone 4", Int64.Type}, {"Disease Severity % of Flower/Fruits/Nuts Affected >> Phytophtora >> Zone 5", Int64.Type}, {"Disease Severity % of Flower/Fruits/Nuts Affected >> Phytophtora >> Zone 6", Int64.Type}, {"Date", type datetime}, {"Action", type text}, {"Next Scheduled", type any}, {"Consultant", type text}, {"Farm Name", type text}, {"Crop Stage", type text}, {"Crop Type", type text}, {"Chemistry Recommended", type text}, {"Damage Type", type text}, {"Other Crop Issues", type text}, {"Hours Spent", Int64.Type}, {"Unique ID", Int64.Type}, {"Spray Date Recommended", type date}, {"Notes for Blocks >> 1 >> Information", type text}, {"Notes for Blocks >> 2 >> Information", type text}, {"Notes for Blocks >> 3 >> Information", type text}, {"Notes for Blocks >> 4 >> Information", type text}, {"Column1", type text}}),
#"Renamed Columns" = Table.RenameColumns(#"Changed Type",{{"Pest Record Number Identified >> Lace bug Nymph >> Zone 1", "Lacebug Nymph Zone 1"}, {"Pest Record Number Identified >> Lace bug Nymph >> Zone 2", "Lacebug Nymph Zone 2"}, {"Pest Record Number Identified >> Lace bug Nymph >> Zone 3", "Lacebug Nymph Zone 3"}, {"Pest Record Number Identified >> Lace bug Nymph >> Zone 4", "Lacebug Nymph Zone 4"}, {"Pest Record Number Identified >> Lace bug Nymph >> Zone 5", "Lacebug Nymph Zone 5"}, {"Pest Record Number Identified >> Lace bug Nymph >> Zone 6", "Lacebug Nymph Zone 6"}, {"Pest Record Number Identified >> Lace Bug Juvenille >> Zone 1", "Lacebug Juvenille Zone 1"}, {"Pest Record Number Identified >> Lace Bug Juvenille >> Zone 2", "Lacebug Juvenille Zone 2"}, {"Pest Record Number Identified >> Lace Bug Juvenille >> Zone 3", "Lacebug Juvenille Zone 3"}, {"Pest Record Number Identified >> Lace Bug Juvenille >> Zone 4", "Lacebug Juvenille Zone 4"}, {"Pest Record Number Identified >> Lace Bug Juvenille >> Zone 5", "Lacebug Juvenille Zone 5"}, {"Pest Record Number Identified >> Lace Bug Juvenille >> Zone 6", "Lacebug Juvenille Zone 6"}, {"Pest Record Number Identified >> Lace Bug Adult >> Zone 1", "Lacebug Adult Zone 1"}, {"Pest Record Number Identified >> Lace Bug Adult >> Zone 2", "Lacebug Adult Zone 2"}}),
#"Split Column by Delimiter" = Table.ExpandListColumn(Table.TransformColumns(#"Renamed Columns", {{"Chemistry Recommended", Splitter.SplitTextByDelimiter(",", QuoteStyle.Csv), let itemType = (type nullable text) meta [Serialized.Text = true] in type {itemType}}}), "Chemistry Recommended"),
#"Changed Type1" = Table.TransformColumnTypes(#"Split Column by Delimiter",{{"Chemistry Recommended", type text}})
in
#"Changed Type1"

Thanks for that, it's making more sense to me now.

If you right click on the 'Chemistry Recommended' column and choose 'Fill >> Down' does this get you closer to what you want?

 

KNP_0-1658191604677.png

 

You'll probably need to add one more step to filter the blank rows you were seeing.

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
chrome-9xf-Zagzel-B

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x

I have filled down and this has not changed the table and relationship data

Did filling down fill in the blanks or not?

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
chrome-9xf-Zagzel-B

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x

sustainhort_0-1658194615254.pngno

 

I don't think I'm going to be able to troubleshoot like this. If you can share the Excel file and PBIX file I may be able to work it out. 

 

Possibly, before the fill down step, click in one of the empty cells, right click and choose 'Replace Values' , enter null in the second box, then do the fill down after that step.

 

KNP_0-1658195313134.png

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
chrome-9xf-Zagzel-B

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x

If i go into each cell and replace the value if(name) with the actual word to remove the blank the relationship is fine ad the table visual shows everything. So the issue is that the splitting is moving it to blank cells although if clicking on the blank cell the data is there

sustainhort_0-1658199869140.pngsustainhort_1-1658199902596.png

 

You've got carriage return and line feed characters in your data. 

 

KNP_0-1658201280001.png

 

That will be causing you issues in your split.

Go back to the step BEFORE the split, right click on the column and choose 'Transform' and 'Clean'.

This should remove any unnecessary white space.

 

KNP_1-1658201360629.png

 

Hopefully this will prevent what appears to be blank rows.

 

 

 

 

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
chrome-9xf-Zagzel-B

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x

Thanks for your help there that worked a treat

Awesome, glad we got there in the end.

If you could 'Accept as Solution' on the post that solved this for you, that'd be appreciated.

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
chrome-9xf-Zagzel-B

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x

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
Top Kudoed Authors