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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Expression.Error: We cannot convert a value of type Table to type Text.

Hi,

 

I am trying to copy my Power Query which is working in Power Bi desktop into a data flow. Where the power query works in Desktop, it gives the following error when running the query in data flow online.

 

"Expression.Error: We cannot convert a value of type Table to type Text"

 

Is there a way to solve this expression error so I can load my dataset in the online data flow environment.

Below first part of the query

 

let
  // *** STEP 1: RETRIEVE SESSIONID ***
  #"1. Set up Session" = Xml.Tables(Web.Contents(pURL_Logon,
        [
            Content=Text.ToBinary(XML_Session),
            Headers=[#"Content-Type" = "text/xml;charset=UTF-8"]
        ] )),
  ExpandedSession = Table.ExpandTableColumn(#"1. Set up Session", "Table", {"Name", "Table"}, {"Name.1", "Table"}),
  ExpandedSession2 = Table.ExpandTableColumn(ExpandedSession, "Table", {"Name", "Table"}, {"Name.2", "Table"}),
  ExpandedSession3 = Table.ExpandTableColumn(ExpandedSession2, "Table", {"SessionID", "AccessToken", "LogonResult", "nextAction", "cluster"}, {"SessionID", "AccessToken", "LogonResult", "nextAction", "cluster"}),

 

Thanks,

 

Leon

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thanks, I have build up the query again and now it works.  However not with your proposed solutions, so that is a litte strange. 

View solution in original post

3 REPLIES 3
v-yuta-msft
Community Support
Community Support

@Anonymous ,

 

This issue should be related to the return value can't be recongized by Xml.Tables() in power bi service. You may change your code using Web.Page() and use Web page option in dataflow instead and check if this issue persists.

Capture.PNG 

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Thanks, I have build up the query again and now it works.  However not with your proposed solutions, so that is a litte strange. 

Anonymous
Not applicable

I have added "{" in front of the "["now the error changed in the following:

 

"We encountered an error during evaluation. Details: Expression.Error: We cannot convert a value of type List to type Record. "

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors