Forum Discussion

dixanthomass's avatar
dixanthomass
Regular Visitor
2 years ago
Solved

Use New Measure Value in Power Query

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?

2 Replies