If you need to run a report for 'Today' or 'Yesterday' without manually entering the date, you can create a query prompt using objects from the Universe Dimensions folder. These objects can be found in the Universe Dimensions folder in most standard universes. Click here for a full list.
Using these objects can be helpful in scheduled reports, when you need to run for 'Today' or 'Yesterday', but cannot manually enter the date.
Getting Universe Dimensions When Using a Custom Universe
If you are using a custom universe that does not contain Universe Dimensions, you can set up a re-query to pull these objects into your date prompt. Here is an example of what that could look like:
- Add a query to your report that uses a standard universe with the Universe Dimensions folder. This will be your Pre-Query. In this example, Standard TouchPoint Universe NEW is being used. You will only need to pull the date objects you want to utilize into the Result Object section. In this example, we're using 'Today' and 'Yesterday'.
2. Once you have added the new query, select Close > Apply Changes and Close. Save your report.
3. Re-open the query panel. Go to the query using the custom universe (Main Query). You can now use the objects from the Pre-Query in your Main Query's filters.
This example is set up like a 'Between' statement would be; however, you cannot use a 'Between' statement when doing a re-query. Therefore, we've set it up to be Greater than or Equal to 'Yesterday' and Less than or Equal to 'Today'.
Note: When selecting Result from another query, you can choose (Any) or (All). They will give you the same options.
You will see a window open like this once you've selected Result from another query (Any)/(All).
Select the date objects you want to use and click OK.
Now you can run scheduled reports for Today or Yesterday, etc. without having to manually enter the date.
- If you do not want to use a 'Between' statement, you can simply set the Date Object Equal to the universe dimension from the Pre-Query.
- If you want to run the report for "last month", your query would look similar to this:
- Similarly, for last year, you would want to use 'Last Year Start' and 'Last Year End'.
If you are currently using a standard universe that contains Universe Dimensions, you can simply set the Date object you are using Equal to an object from the Universe Dimensions Folder, as seen in Step 3. There will be no need for a re-query. You will have the option to choose Object from this query.
From here, you can select any of the objects in the Universe Dimensions folder.