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
shwethag
New Member

Expression.Error: We cannot apply operator & to types Text and Table

I am trying to combine two queries where results of one query will be consumed as parameter in other. To hook in results, I used & to combine strings. But while executing I'm getting error & cannot be applied to text and table. I tried several alternatives but none are working. Can someone please help me understand how to fix this?

 

My queries are something like this

let latestGA = Sql.Database("...."]) in latestGA,

query = Text.From(Text.From("let Events = reportdatav2 | where AppInfo_Version in ('") & @LatestGA & Text.From("') | extend payload = parse_json(GENERIC_PAYLOAD)")),

Data = Json.Document(Web.Contents("....",[Query=[#"csl"=@query,#"x-ms-app"="PowerQuery",#"properties"=.....)),

1 REPLY 1
JosefPrakljacic
Solution Sage
Solution Sage

Hey @shwethag 

 

here you have a short ScreenGif that explains how to create "Parameter-Queries".

 

Example.gif

 

Please create one parameter query by one.

 

You are also writing the parameters wrong you don't need that @ you also have a syntactic error in the first line -> You don't need that braket -> May I refer you to this article Article_1

 

If this post was helpful may I ask you to mark it as solution and give it some kudos?

Have a nice day!

BR,
Josef

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.