cancel
Showing results for 
Search instead for 
Did you mean: 

Date Filter -- allow users to only choose a value from list of days

sylvia_gulubova
7 - Data Storage
7 - Data Storage

How is it possible to limit user actions with date filters (like the one below) to only choose a value from list of days and nothing else (change the list format to months/years, use calendar, time frame, ranking, allow multiple selections, etc.)?

Sisense Date Filter Screenshot 2024-11-27 173118.png

1 ACCEPTED SOLUTION

Hey @sylvia_gulubova ,

Date Filter allow different Granularities such as Years, Quarters, Months, Weeks and Days. 
In Version L2024.1 the New UI Filters are enabled which provide different view as the screenshot shared which using the old filters UI/UX. 
In both cases, using the Dependent filter will allow switching the Granularities which isn't sufficient in this case. 

I would refer to the second option which is creating a blox drop down filter that allow a single select for Days.

  1. Create a Blox widget and Add the Date Column with Days granularity. Please find an Example.
  2. Add the Date as dashboard filter and Hide it 
 
 

Blox Example

{
    "showCarousel": true,
    "carouselAnimation": {
        "delay": 0,
        "showButtons": false
    },
    "body": [
        {
            "type": "Container",
            "style": {
                "justify-items": "center",
                "align-items": "center"
            },
            "items": [
                {
                    "type": "TextBlock",
                    "spacing": "medium",
                    "size": "large",
                    "text": "Select date",
                    "style": {
                        "text-align": "center",
                        "font-weight": "600"
                    }
                },
                {
                    "type": "Container",
                    "spacing": "small",
                    "items": [
                        {
                            "type": "Input.ChoiceSet",
                            "id": "data.filters[0].filterJaql.members[0]",
                            "class": "",
                            "value": "PDAs",
                            "displayType": "compact",
                            "style": {
                                "align-self": "center"
                            },
                            "choices": "{choices:Date}"
                        }
                    ]
                }
            ]
        }
    ],
    "actions": [
        {
            "type": "Filters",
            "title": "Filter!",
            "data": {
                "filters": [
                    {
                        "panelName": "Date",
                        "filterJaql": {
                            "explicit": true,
                            "members": [
                                ""
                            ]
                        }
                    }
                ]
            }
        },
        {
            "type": "Filters",
            "title": "Clear",
            "data": {
                "filters": [
                    {
                        "panelName": "Date",
                        "filterJaql": {
                            "explicit": true,
                            "all": true
                        }
                    }
                ]
            }
        }
    ]
}

Best Regards

 

Assaf

View solution in original post

6 REPLIES 6

AssafHanina
Sisense Team Member
Sisense Team Member

Hey @sylvia_gulubova ,

Please find a potential Solutions to achieve a dropdown list for Days Granularity:

Option 1 - Add 2 date filters and hide the parent filter

  • First Filter - with Years granularity (For Example) which set to include all.
  • Second Filter is Dependent Filter with Days granularity. 

When setting up a dependent filter, the only available option is a List, which can be configured for either Single or Multi-Select. This approach supports both filters and allows the flexibility to hide the Parent filter if users are not expected to interact with it, as describe in following Community Article.
Additionally, the Parent filter may need to be included as it slices the selected members within the days filter.

AssafHanina_0-1732813124737.png

After Hiding the Column

AssafHanina_1-1732813288177.png

Additional option is to create a Blox Dropdown filter that include the Days members in the dropdown.
Please find related community article

best regards

Assaf

sylvia_gulubova
7 - Data Storage
7 - Data Storage

Hello @AssafHanina 

I've tried option one and the result is not what I've expected (see the screenshots below)
After "parent" filter was hidden, "dependent" filter still have options to choose Week for example.
Tested with Sisense L2024.1 as dashboard owner and as a different user.

Date Filter 02 Screenshot 2024-12-02 113024.pngDate FIlter 01 Screenshot 2024-12-02 112919.png


Hey @sylvia_gulubova ,

Date Filter allow different Granularities such as Years, Quarters, Months, Weeks and Days. 
In Version L2024.1 the New UI Filters are enabled which provide different view as the screenshot shared which using the old filters UI/UX. 
In both cases, using the Dependent filter will allow switching the Granularities which isn't sufficient in this case. 

I would refer to the second option which is creating a blox drop down filter that allow a single select for Days.

  1. Create a Blox widget and Add the Date Column with Days granularity. Please find an Example.
  2. Add the Date as dashboard filter and Hide it 
 
 

Blox Example

{
    "showCarousel": true,
    "carouselAnimation": {
        "delay": 0,
        "showButtons": false
    },
    "body": [
        {
            "type": "Container",
            "style": {
                "justify-items": "center",
                "align-items": "center"
            },
            "items": [
                {
                    "type": "TextBlock",
                    "spacing": "medium",
                    "size": "large",
                    "text": "Select date",
                    "style": {
                        "text-align": "center",
                        "font-weight": "600"
                    }
                },
                {
                    "type": "Container",
                    "spacing": "small",
                    "items": [
                        {
                            "type": "Input.ChoiceSet",
                            "id": "data.filters[0].filterJaql.members[0]",
                            "class": "",
                            "value": "PDAs",
                            "displayType": "compact",
                            "style": {
                                "align-self": "center"
                            },
                            "choices": "{choices:Date}"
                        }
                    ]
                }
            ]
        }
    ],
    "actions": [
        {
            "type": "Filters",
            "title": "Filter!",
            "data": {
                "filters": [
                    {
                        "panelName": "Date",
                        "filterJaql": {
                            "explicit": true,
                            "members": [
                                ""
                            ]
                        }
                    }
                ]
            }
        },
        {
            "type": "Filters",
            "title": "Clear",
            "data": {
                "filters": [
                    {
                        "panelName": "Date",
                        "filterJaql": {
                            "explicit": true,
                            "all": true
                        }
                    }
                ]
            }
        }
    ]
}

Best Regards

 

Assaf

Hey @sylvia_gulubova ,

Date Filter allow different Granularities such as Years, Quarters, Months, Weeks and Days. 
In Version L2024.1 the New UI Filters are enabled which provide different view as the screenshot shared which using the old filters UI/UX. 
In both cases, using the Dependent filter will allow switching the Granularities which isn't sufficient in this case. 

I would refer to the second option which is creating a blox drop down filter that allow a single select for Days.

  1. Create a Blox widget and Add the Date Column with Days granularity. Please find an Example.
  2. Add the Date as dashboard filter and Hide it 
 
 

Blox Example

{
    "showCarousel": true,
    "carouselAnimation": {
        "delay": 0,
        "showButtons": false
    },
    "body": [
        {
            "type": "Container",
            "style": {
                "justify-items": "center",
                "align-items": "center"
            },
            "items": [
                {
                    "type": "TextBlock",
                    "spacing": "medium",
                    "size": "large",
                    "text": "Select date",
                    "style": {
                        "text-align": "center",
                        "font-weight": "600"
                    }
                },
                {
                    "type": "Container",
                    "spacing": "small",
                    "items": [
                        {
                            "type": "Input.ChoiceSet",
                            "id": "data.filters[0].filterJaql.members[0]",
                            "class": "",
                            "value": "PDAs",
                            "displayType": "compact",
                            "style": {
                                "align-self": "center"
                            },
                            "choices": "{choices:Date}"
                        }
                    ]
                }
            ]
        }
    ],
    "actions": [
        {
            "type": "Filters",
            "title": "Filter!",
            "data": {
                "filters": [
                    {
                        "panelName": "Date",
                        "filterJaql": {
                            "explicit": true,
                            "members": [
                                ""
                            ]
                        }
                    }
                ]
            }
        },
        {
            "type": "Filters",
            "title": "Clear",
            "data": {
                "filters": [
                    {
                        "panelName": "Date",
                        "filterJaql": {
                            "explicit": true,
                            "all": true
                        }
                    }
                ]
            }
        }
    ]
}

Best Regards

 

Assaf

Benji_PaldiTeam
11 - Data Pipeline
11 - Data Pipeline

Hi @sylvia_gulubova ,

In addition to @AssafHanina  solution, I’d like to propose a different approach.
By using the Advanced Filters plugin and hiding the filter from the filters panel—either through a script or with our FREE Hide Filters plugin—you can easily achieve the functionality you’re looking for. This ensures that users are restricted to selecting only one date.

Benji_PaldiTeam_0-1733366863421.png

 

This method is versatile and can also be applied to other scenarios, such as date range selection, restricting date ranges, dependency filters, and more.

Benji_PaldiTeam_1-1733366876558.png

Benji_PaldiTeam_2-1733366899450.png

 

Feel free to reach out if you have further questions, we're always happy to help (: 
Paldi Solutions - Number #1 Sisense Plugins Developer 

DRay
Community Team Leader
Community Team Leader

Hello @sylvia_gulubova,

I’m following up to see if the solutions offered by @Benji_PaldiTeam and @AssafHanina  worked for you.

If so, please click the 'Accept as Solution' button on the appropriate post. That way other users with the same questions can find the answer. If not, please let us know so that we can continue to help.

Thank you.

David Raynor (DRay)