Hi Everyone -
First of all my apologies because I was not even sure how to ask this question. I am trying to automate some analysis we do every month. I am using power query in Excel and queried data from SQL server. As of Right now I have my current period data and prior period data queried from SQL Server. Current period is this month and last month’s data (Mar and Feb). Prior period is Jan and Dec. Everything is working fine and all I wonder if there is any way to include an input command which would directly update the dates, etc. in Power Query SQL code without the need for end user to go into query editor? Usually the fields that we would need to update regularly would be the following:
a. Dates
b. Account Number
I wonder if there could be a VBA code to accomplish this. Hope this makes sense and any help would be greatly appreciated!
Thanks!!
Here is the SQL query I used.
SELECT DISTINCT
,[Company]
,[Accounting_Month]
,[Account_Name]
,[Main_Account_Type]
,[Reporting_Category]
FROM [DEP_WTH].[JJ].[Journal]
WHERE [Company] IN ('5000')
and [Accounting_Date] Between '2018-10-31' AND '2018-11-30'
and [Account] = '12345'
Bookmarks