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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Prabhu_MDU
Advocate I
Advocate I

how to select multiple values as default in a slicer in power bi

Hi, 

 

I have a report which is based on "Insurance" domain which has 6 - 7 slicers. Among them, I want to make changes to one slicer. 

 

The slicer where I want to make changes has "Policy Year" value, I mean, this slicer will hold the distinct year of available policies. (like 2018,2017,2016....)

 

Now, my requirement is to select the "Current Year" (2018) and the "Previous Year" (2017) to be selected as default..  By do this, I can restrict the data to display just  2 years of data, later on user can go ahead with his own choice. 

 

any Ideas Please... 

 

Image of the slicer for your reference.

PolicyYear_SlicerImage.JPG

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

Hi @Prabhu_MDU,

 

I made one sample for your reference. If it doesn't meet your requirement, kindly share your sample data and excepted result to me.

 

Here we need to create two calculated columns.

 

 

YEAR = YEAR(dimtime[Date])
Sli = IF(dimtime[YEAR]=YEAR(TODAY()) || dimtime[YEAR]= YEAR(TODAY())-1,"the last 2 years", ""&dimtime[YEAR])

 

 

Capture.PNG

 

For more details, please check the pbix as attached.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

5 REPLIES 5
v-frfei-msft
Community Support
Community Support

Hi @Prabhu_MDU,

 

I made one sample for your reference. If it doesn't meet your requirement, kindly share your sample data and excepted result to me.

 

Here we need to create two calculated columns.

 

 

YEAR = YEAR(dimtime[Date])
Sli = IF(dimtime[YEAR]=YEAR(TODAY()) || dimtime[YEAR]= YEAR(TODAY())-1,"the last 2 years", ""&dimtime[YEAR])

 

 

Capture.PNG

 

For more details, please check the pbix as attached.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Hi @v-frfei-msft

 

Thanks a lot for your reply.. it worked for me.. 

 

Thanks,

Prabhu

PattemManohar
Community Champion
Community Champion

Select the filter values which needs to be defaulted and save the pbix file. It will have same filters selected once you re-open the pbix file. 





Did I answer your question? Mark my post as a solution!

Proud to be a PBI Community Champion




Hi @PattemManohar

 

thanks for your reply, what you said is correct. 

 

I have also set the "Lock Aspect" condition to "ON" so whatever the changes I made and save the report, it will persists longer,

but this will be something like "hardcoded" value, but I wish to get this dynamically.. 

 

I have done in someother way which I know.. 

 

Actually this slicer getting data from a SQL query, I modified the query by adding one more derived column to get the 2018 as "Current Year" and 2017 as "Previous Year" and used this derived column in place of the old column in the slicer. 

 

Now, the report works as how I expected... 

 

Anonymous
Not applicable

how you chose default selection dynamically ??

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.