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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
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.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.