Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
AkshayManke
Helper II
Helper II

Set the Date Filter to Blank as Default

Hello,

 

I want to allow users to select a specific date using the date filter. The filter is configured and accepting the dates. But i want that initially the dafault value should be blank. How to do that please?

 

FYI Please. I have three dates filters for now and i want to set all of them to be blank.

 

Thanks in advance.

 

Regards,

1 ACCEPTED SOLUTION
v-tangjie-msft
Community Support
Community Support

Hi @AkshayManke ,

 

According to your description, here are my steps you can follow as a solution.

(1) This is my test data. 

vtangjiemsft_0-1719283166052.png

Note that the date columns here are of text type.

(2) Get more visuals->Search Preselected Slicer.

vtangjiemsft_2-1719283458430.png

(3) We can create a table.

_PreselectedSlicer = DATATABLE(
    "IsDirtySlicer", BOOLEAN, 
    {
        {FALSE()},
        {TRUE()}
       
    }
)

(4) We can create a measure.

_Dafault = 
VAR _SelectedWeek = SELECTEDVALUE('Table'[Date])
VAR _Dafault =BLANK()

RETURN 
 _SelectedWeek=_Dafault

(5) Then the result is as follows.

vtangjiemsft_3-1719283682358.png

If your date is listed as a date type, the result is as follows, which is due to design.

vtangjiemsft_1-1719283268948.png

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

View solution in original post

4 REPLIES 4
v-tangjie-msft
Community Support
Community Support

Hi @AkshayManke ,

 

According to your description, here are my steps you can follow as a solution.

(1) This is my test data. 

vtangjiemsft_0-1719283166052.png

Note that the date columns here are of text type.

(2) Get more visuals->Search Preselected Slicer.

vtangjiemsft_2-1719283458430.png

(3) We can create a table.

_PreselectedSlicer = DATATABLE(
    "IsDirtySlicer", BOOLEAN, 
    {
        {FALSE()},
        {TRUE()}
       
    }
)

(4) We can create a measure.

_Dafault = 
VAR _SelectedWeek = SELECTEDVALUE('Table'[Date])
VAR _Dafault =BLANK()

RETURN 
 _SelectedWeek=_Dafault

(5) Then the result is as follows.

vtangjiemsft_3-1719283682358.png

If your date is listed as a date type, the result is as follows, which is due to design.

vtangjiemsft_1-1719283268948.png

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

Hello @v-tangjie-msft , What would your alternative solution be if the Custom Visual Preselected Slicer were suddenly unavailable?   Can you provide this in a form with a stock visual available now?

Hi @foodd ,

 

Unfortunately, the default slicer visual doesn't support pre-selected values, and you can post your ideas on the Idea forum. 

https://ideas.powerbi.com/ideas/

 

Best Regards,

Neeko Tang

ajohnso2
Responsive Resident
Responsive Resident

Since slicers are based off the values in your tables how do you expect to default it to <BLANK>?

You could default to a particular date i.e always the current days date

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.