Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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/
User | Count |
---|---|
101 | |
90 | |
80 | |
71 | |
69 |
User | Count |
---|---|
114 | |
97 | |
97 | |
73 | |
72 |