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

Insert Parameter in M language

Hi,

 

I'm trying to build a Parameterised Query using M Language. I have my variables stored as text fields but when I add them to the final query, it doesnt seem to pick up the string but just returns the variable name. So where I might expect the result of the query, I get the query name.

 

I'm quite new to M, but if I were in VBA, I would change the syntax from "Text" to  "" & variable & "" to enter variable as a string. How do I achieve the same with M?

 

Thanks

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi All,

 

So after many variations, it turns out it's the same as VBA without spaces. I was building a Paramaeterised Query and wanted a single place to change the value and it update the 6 Queries I have.

 

The Date value appeared like this "201801", so I created a variable and then managed to insert that using ""&Date&""

 

All working, thanks for you help. 🙂

View solution in original post

15 REPLIES 15

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.