Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
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
Solved! Go to Solution.
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 ,
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.
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.
Thanks, I have build up the query again and now it works. However not with your proposed solutions, so that is a litte strange.
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. "
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
85 | |
42 | |
30 | |
27 | |
27 |