Join 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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I have created a list of states and added them to a slicer. Then, I added a new measure that concatenates the selected values in the slicer using comma as a delimiter. I want to use this measure in a SQL query written in Power Query. Below are the screenshots.
I want to use the Custom measure value in the below code:
let
Source = Sql.Database("localhost", "Dixan", [Query = "SELECT TOP (1000) [Location], [Name], [State] FROM [Dixan].[dbo].[PowerBi] where [State] in ('Delhi','Kerala')"])
in
Source
instead of 'Delhi','Kerala' I want to use measure value. Is this possible?
Solved! Go to Solution.
@dixanthomass No. To the best of my knowledge the only way you can use semantic model things in Power Query is using DirectQuery where you map columns to parameters: Dynamic M query parameters in Power BI Desktop - Power BI | Microsoft Learn
@dixanthomass No. To the best of my knowledge the only way you can use semantic model things in Power Query is using DirectQuery where you map columns to parameters: Dynamic M query parameters in Power BI Desktop - Power BI | Microsoft Learn
Thank you, @Greg_Deckler for your response.
is this possible in any other way? i want to pass the selected values from the slicer into the SQL query for an IN operation. as mentioned in the above code.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!