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
Anonymous
Not applicable

Error when trying to expand column to new row.

Hi all,

I have a dataset that looks like this. Each cell can have multiple login and logout times corresponding to each other. (ie. login time 11:00:03 and logout time 13:29:42).

gjunhao1_0-1637738967895.png

 

I used the code below to group the login and logout time together:
= Table.AddColumn(#"Promoted Headers", "Temp", each List.Zip( { Text.Split([Login Time],"#(lf)"), Text.Split([Logout Time],"#(lf)") }))


Next I clicked, expand to new rows and then extract values.

gjunhao1_1-1637739180272.png

Finally, I split the columns by the delimiter to get the correct values:

gjunhao1_2-1637739389656.png


However, when I click close and apply, i get this error:
OLE DB or ODBC error: [Expression.Error] We cannot convert the value null to type Text..

 

I cant figure out why as I have no null values in the 2 columns. The error occurs at the step where I expand to new rows. 

When I replicated the steps in excel's power query, it seems to work fine. Please help!

 

1 ACCEPTED SOLUTION
v-yingjl
Community Support
Community Support

Hi @Anonymous ,

The query itself seems normal, how did you split columns and whether there is extra space in the source data when split column by space.

 

Perhaps you can consider share the whole query steps in Power Query.

 

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 @Anonymous ,

The query itself seems normal, how did you split columns and whether there is extra space in the source data when split column by space.

 

Perhaps you can consider share the whole query steps in Power Query.

 

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.

lbendlin
Super User
Super User

@Anonymous Please provide sanitized sample data that fully covers your issue. Paste the data into a table in your post or use one of the file services. Please show the expected outcome.

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