Default to todays date on Date Filter
How do I get the Date Filter to default to todays date on a Discovery?
( Scenario : The user wants to look at a WTD?MTD etc up to a point in time but wants the Date Filter to defaults to today's date)
5 replies
-
Hi Lolla Daniel
Currently, you cannot set the slicer default.
But You may try the following,
Create a list with only one member, the today date using the Strtomember and now function (In MDX):My cube Date formatting is : [Date].[Month Dates].[Date].&[2008-01-01T00:00:00]
I've wrote this set in script mode, under the correct Dimension (in context menu)
{STRTOMEMBER("[Date].[Month Dates].[date].&[" + Format(now(), "yyyy-MM-ddT00:00:00")+ "]")}
In the Discovery report, I've used this set in the background of the report.
For our next major release (v6.xx, delivery date is still unknown)
The development team is working to add several configurations for the slicer default selection (First, Last, By name, By position).
This will make it easier to set the default member from your list.Hope it helps.
-
hey Dvir , I have tried your solution above but it is not working for me. I am getting an error saying the pql function "NOW" is not supported. Can you advise please?
-
Hi Sophie,
it looks like you are using IMDB model,
In this case, you should create a list and use the CurrentDate() function to bring the today date from the date attribute/hierarchy.
Then in the report, select the set in a slicer, it will set it at the background and will be dynamically changed each time you will run the report.
Please view this link for more information regarding the CurrentDate function and many more functions from Pyramid Online help guide.
Hope it helps
-
Hi Dvir,
In which version of Pyramid is the CurrentDate() function available? When I try to create a list, the last function available is Parallel Period, and I'm currently using 2018.05.602.
We also have the need to work with a query that returns data from the current date.
Thanks!
Francois
-
Hi Francois,
I'm guessing you are using an OLAP cube or a Tabular model, in that case, please use the first suggestion.
Thanks.