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.
Hi Team,
I have a script which has the date variable mentioning as below image which are highlighted . If I pull this script into Power BI Desktop(SQL Source-Query) How can I pass the values into this variable from Power BI Desktop using the filter Slicer. Please do the needful asap as I have ambiguity on this .Thank You so Much.
Hi @Anonymous ,
Please take a look at the following link to see if it helps, and hopefully some other expert in Power BI will be able to solve it.
How-do-I-pass-parameters-to-my-SQL-statement
Hope it helps,
Community Support Team _ Caitlyn
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Hi Team,
This is the simple exampel to understood
Declare @Employee varchar(max)
Set @Employee = 'Filter Value from Slicer Visual from Power BI'
Select top 10
EmployeeID,EmployeeAddress from Employee where EmployeeName=@Employee
If we select Employee = 'Dhoni' from Power BI Slicer Visual , the sql source script should as follows
Declare @Employee varchar(max)
Set @Employee = 'Dhoni'
Select top 10
EmployeeID,EmployeeAddress from Employee where EmployeeName='Dhoni'
If we pass multiple values like Employee = Dhoni,Kohli then the sql query should be as follows
Declare @Employee varchar(max)
Set @Employee = 'Dhoni','Kohli'
Select top 10
EmployeeID,EmployeeAddress from Employee where EmployeeName in ('Dhoni','Kohli')
Please do the needful . Thank You.
I have seen this from different source and its posted in 2016 . I hope any chances that can available now
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
117 | |
105 | |
69 | |
67 | |
43 |
User | Count |
---|---|
148 | |
103 | |
103 | |
88 | |
66 |