I am in need of a Criteria that will automatically show the current months data, Currently at the beginning of each month i have to change the date range shown below.
Solved! Go to Solution.
What type of database are you connecting to?
You can insert a WHERE clause in your SQL statement. For MS SQL Server for instance, it could be something like
WHERE DATEDIFF(day, DATE,(DATEADD(mm, DATEDIFF(mm, 0, GETDATE()), 0)))>=0
The Dynamic Input tool is perfect for that.
First, build the date value you need in the formula tool.
Next, build your query in the Dynamic Input tool, and where you'd normally insert your date range, put something that you can replace.
Under the 'Add' drop-down, choose SQL: Update Where Clause
Finally, update the text you added with the date you generated, and you should be on your way. I use this all the time on various reports. Looks a bit like image below
User | Count |
---|---|
17 | |
15 | |
15 | |
8 | |
6 |