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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors