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.
Hello,
I have created two parameters named StartingDate and EndingDate. A list of values is associated to each parameter.
When I import data from a sql table the following script is used.
select *
From Database1.TableA
Where FiscalPeriod between 200601 and 200612
This script works fine. But I would like to know how I can replace those two values for StartingDate and EndingDate.
Thanks in advance for your help
Solved! Go to Solution.
Hi alepage
Try this
select * From Database1.TableA Where FiscalPeriod between @StartingDate and @EndingDate
So, there are a lot of information like this https://blog.crossjoin.co.uk/2016/12/11/passing-parameters-to-sql-queries-with-value-nativequery-in-...
Anyway, you can use parameter as a filter option which is pretty good described here https://powerbi.microsoft.com/ru-ru/blog/deep-dive-into-query-parameters-and-power-bi-templates/
Hi alepage
Try this
select * From Database1.TableA Where FiscalPeriod between @StartingDate and @EndingDate
So, there are a lot of information like this https://blog.crossjoin.co.uk/2016/12/11/passing-parameters-to-sql-queries-with-value-nativequery-in-...
Anyway, you can use parameter as a filter option which is pretty good described here https://powerbi.microsoft.com/ru-ru/blog/deep-dive-into-query-parameters-and-power-bi-templates/
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 |
---|---|
112 | |
97 | |
82 | |
67 | |
61 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |