Forum Discussion
qazwsxedc
5 years agoHelper III
Reference a date in another query
I have several sql queries that need to delare a date, e.g. Declare @date1 datetime ='31july2020' Instead of changing the date for all the queries each month, I want to link it to another query "Da...
- 5 years ago
Hi qazwsxedc ,
If you import data by T-SQL, you could reference this similar threads to use parameters change date.
https://community.powerbi.com/t5/Desktop/How-do-I-pass-parameters-to-my-SQL-statement/td-p/118716
https://community.powerbi.com/t5/Desktop/Declare-parameters-for-SQL-query-in-Power-BI/td-p/195620
v-xuding-msft
5 years agoCommunity Support
Hi qazwsxedc ,
If you import data by T-SQL, you could reference this similar threads to use parameters change date.
https://community.powerbi.com/t5/Desktop/How-do-I-pass-parameters-to-my-SQL-statement/td-p/118716
https://community.powerbi.com/t5/Desktop/Declare-parameters-for-SQL-query-in-Power-BI/td-p/195620
- qazwsxedc5 years agoHelper III
Thank you very mcuh. The links are useful!