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
slalithprasad
Helper II
Helper II

Dynamic M Query

Hello I am trying something like this and it is not working, please help -

 

Doubt 1.png

 

Works when Creditor = 'japan' and also works when i use amount > " &amount])

 

amount Paramter type is Text and List of Values with 40,50,60 and it works

credit Parameter type is Text and List of Values with France, Japan and UK

but doesn't work like this -

 

Doubt 2.png

 

What am i doing wrong? please help me understand, thank you.

 
2 REPLIES 2
v-eqin-msft
Community Support
Community Support

Hi @slalithprasad ,

 

Please take a look at this case for reference.

https://community.powerbi.com/t5/Desktop/DataSource-Error-Invalid-column-name/td-p/627036

 

Did I answer your question ? Please mark my reply as solution. Thank you very much.
If not, please upload some insensitive data samples and expected output.

 

Best Regards,
Eyelyn Qin

PhilipTreacy
Super User
Super User

Hi @slalithprasad 

I can't see anything wrong with your query if the parameter credit really does contain the text value France.  Odd that the error is about an invalid column name.

Can you create another query to check the value of the credit parameter, like this:

 

let
    Source = "The value of the credit parameter is " & credit
in
    Source

 

What result do you get when you hard code the text France into the query (as you did with Japan) ?

Can you please share the entire query or PBIX file so I can see all the code.  Including the query for creating the parameters.

Phil


If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


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.