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
FrankKrogh
Helper I
Helper I

Expression results in Applied Steps in Power Query does not seem to comply with M script execution

I have written a M script to run a dynamic SQL query using parameters on a Direct Query. The script is based on this tutorial example (https://learn.microsoft.com/en-us/power-bi/connect-data/desktop-dynamic-m-query-parameters).

 

The M script works fine with parameter input from the slicers, and the generated dynamic SQL query return data correctly to the table visual. However, some results of the M script expressions in the Applied Steps in Power Query does not seem to comply with actual result/execution of the M script. The same goes for the dynamic part of the generated final SQL query expression. It seems to me that only the single-select and boolean value result of expressions are shown, but not the multiple-select value results (shown only as a double quote (''). 

 

It may be a logic explanation that I have missed here but it would indeed be helpful for unexperienced script editors like me to have a complete documentation of the results from M script expressions as a debugging assistance in the Power Query Editor.

 

Power Query - results from Applied Steps expressions.png

1 REPLY 1
lbendlin
Super User
Super User

Your M code looks a little convoluted. You can simplify that.

 

Passing Any Arbitrary Value From A Power BI Report To A Dynamic M Parameter (crossjoin.co.uk)

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.

Top Solution Authors
Top Kudoed Authors