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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Sonashish
Resolver I
Resolver I

Single Select Slicer with Default Option

Hello In my powerBI report I am using Single Select Slicer on Year field. In the slicer dropdown, I want to add "Select Year at the top and by default it this option should be selected or when I reset the filter this option should get selected.

 

How Can I do this?

 

Regards

Sona

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @Sonashish  ,

You can use the isfiltered function

According to your description, I created some data:

v-yangliu-msft_0-1608541079213.png

Here are the steps you can follow:

1. Create measure to calculate the amount of a column when selecting a year

select_year =
var _select=SELECTEDVALUE('Table'[Year])
return CALCULATE(SUM('Table'[amount]),FILTER('Table','Table'[Year]=_select))

Result:

The default is blank ()

2020.12.21.22222.png

2. Use isfiltered to create measure. The default value is 2017

ISFILTERED =
IF(ISFILTERED('Table'[Year]),'Table'[select_year],CALCULATE(SUM('Table'[amount]),FILTER('Table','Table'[Year]=2017)))

Result:

The default value is 2017

v-yangliu-msft_2-1608541079219.png

You can downloaded PBIX file from here.

 

Best Regards,

Liu Yang

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
Anonymous
Not applicable

Hi  @Sonashish  ,

You can use the isfiltered function

According to your description, I created some data:

v-yangliu-msft_0-1608541079213.png

Here are the steps you can follow:

1. Create measure to calculate the amount of a column when selecting a year

select_year =
var _select=SELECTEDVALUE('Table'[Year])
return CALCULATE(SUM('Table'[amount]),FILTER('Table','Table'[Year]=_select))

Result:

The default is blank ()

2020.12.21.22222.png

2. Use isfiltered to create measure. The default value is 2017

ISFILTERED =
IF(ISFILTERED('Table'[Year]),'Table'[select_year],CALCULATE(SUM('Table'[amount]),FILTER('Table','Table'[Year]=2017)))

Result:

The default value is 2017

v-yangliu-msft_2-1608541079219.png

You can downloaded PBIX file from here.

 

Best Regards,

Liu Yang

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

Thanks Liu, I implemented your implementation. It seems to be working.

 

Thanks

 

Sonashish
Resolver I
Resolver I

Hello Liu,

 

Thanks for reply. I have two single select slicer as mentioned

1st Slicer (Year) = It always select first value

2nd Slicer (Country) = It also always select first value

 

What I was looking for give option Select Year and Select Country. Because as this single select slicer so by default one option is always selected. I dont want to default option or first valus should always select until end user select. That is why I was looking for add Select Year and Select Country. If this not possible then is there any way to not select first value as default value. I also added a button (reset all filters) using bookmark action. So once user click on this button so any value which is selected in these two slicers, both should be unselect.

 

Please advise

Sonashish

Anonymous
Not applicable

Hi  @Sonashish ,

Currently, we can't set the default value for slicers, because DAX is not available in the report level filter panel. If you want the default value to be the current year, you can create a new calculated column to represent "yesterday" or "other dates", and then use this column to filter the chart.

 

This is related content, I hope it can help you:

https://businessintelligist.com/2016/04/15/power-bi-tutorial-dynamically-update-date-slicer-to-show-...

https://community.powerbi.com/t5/Desktop/Setting-a-Default-Value-for-a-Slicer/td-p/440659

https://community.powerbi.com/t5/Service/Default-value-in-Report-Filter-Panel/td-p/47574

Best Regards,

Liu Yang

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

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors