Using dropdown instead of date picker?

Hello,

I have created a parameter control with startDate and endDate and used this in a filter “Date & time range”.

The parameter control can only enable me to use date picker. See below:
image

My actual date data is actually a monthly data of the first day of every month, and it is quite confusing for some end users to use this date picker given that the rest of the date are invalids (although it will filter properly).

I want to create a new filter dropdown, whereby it is in the format of yyyy-MM-dd. I saw a forum post regarding this but it uses string which will not allow me to use parameter in my “Date & time range”.

How should I go about doing this?

Thanks.

Hi @dixerio,
Is the forum post I’ve included below the one that you explored? If the calculated field is created at the dataset level, you can still utilize as a parameter, you’ll just have to setup a different filter.

This is currently the best work around option for this scenario. I’ll mark this as a feature request though as there are instances where this would be great!

Let me know if you have any additional questions.

1 Like

Hi @Brett ,

Actually yes, I followed that article.

I created a dataset level calculated field but I can’t seem to get it to work properly with the filter.

I believe I am stuck at step 4. Just a question, if I have this article workaround, does this means I can’t use the date range filtering? Do I have to add this string into calculated field for all my visualisation? (I have 12 visualisation that are using filters from the date range picker)

Hi @dixerio,
Let’s try this alternate option instead, as this would allow you to keep the date picker.

Create a calculated field using truncDate (Make sure to change the date fields to your actual fields):

ifelse(truncDate('MM', ${StartDate}) <= truncDate('MM', {Date Field}) AND truncDate('MM', ${EndDate}) >= truncDate('MM', {Date Field}), 1, 0)

Then you can use this as your filter instead and set to include 1’s instead of your date picker filter.
This should make it so any date picked within a month will just bring up the month selected.

Let me know if this works for your case!

Hi @dixerio,
It’s been awhile since we last heard from you, did you have any additional questions?

If we do not hear back within the next 3 business days, I’ll go ahead and close out this topic.

Thank you!

Hi @dixerio,
Since we haven’t heard back, I’ll close out this topic. However, if you have any additional questions, feel free to create a new post in the community and link this discussion for relevant information if needed.

Thank you!