cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

default slicer selection for Current month

Team,

 

I have a table which contains date from Jan 2020 to Dec 2020 and i have created a slicer as below,  selected may month date manually ... but i want to select always current month minus 2 months as a default selection ... is it possible to do? pls help.

 

Mani1205_0-1594030133366.png

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Super User IX
Super User IX

Re: default slicer selection for Current month

@Mani1205 , Not possible to default slicer by function.

You can create a column like this and have the values selected

new column =

Switch( True(),

eomonth([Date],0) >= eomonth(Today(),-1),"Last to Last  Month" ,
eomonth([Date],0) >= eomonth(Today(),-1),"Last Month" ,
eomonth([Date],0) >= eomonth(Today(),0),"This Month" ,
Format([Date],"MMM-YYYY")
)

 

new column =

Switch( True(),

eomonth([Date],0) >= eomonth(Today(),-1),"Data  Month" ,
Format([Date],"MMM-YYYY")
)

 

and select last to last month or data month and save the slicer value



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
My Recent Blog -Week is not so Weak Connect on Linkedin

Proud to be a Super User!

View solution in original post

Highlighted
Microsoft
Microsoft

Re: default slicer selection for Current month

Hi @Mani1205 ,

You can refer the content in the following link as workaround to achieve it.

Power BI - How to Set a Default Slicer Value

Best Regards

Rena

View solution in original post

2 REPLIES 2
Highlighted
Super User IX
Super User IX

Re: default slicer selection for Current month

@Mani1205 , Not possible to default slicer by function.

You can create a column like this and have the values selected

new column =

Switch( True(),

eomonth([Date],0) >= eomonth(Today(),-1),"Last to Last  Month" ,
eomonth([Date],0) >= eomonth(Today(),-1),"Last Month" ,
eomonth([Date],0) >= eomonth(Today(),0),"This Month" ,
Format([Date],"MMM-YYYY")
)

 

new column =

Switch( True(),

eomonth([Date],0) >= eomonth(Today(),-1),"Data  Month" ,
Format([Date],"MMM-YYYY")
)

 

and select last to last month or data month and save the slicer value



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
My Recent Blog -Week is not so Weak Connect on Linkedin

Proud to be a Super User!

View solution in original post

Highlighted
Microsoft
Microsoft

Re: default slicer selection for Current month

Hi @Mani1205 ,

You can refer the content in the following link as workaround to achieve it.

Power BI - How to Set a Default Slicer Value

Best Regards

Rena

View solution in original post

Helpful resources

Announcements
Meet the 2020 Season 2 Power BI Super Users!

Meet the 2020 Season 2 Power BI Super Users!

Find out who's part of the program this season, and welcome the new Super Users.

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

July 2020 Community Highlights

July 2020 Community Highlights

Learn about the exciting things that happened in July.

Featured Data Story of The Month

Featured Data Story of The Month

All Data Stories Gallery contributions are reviewed for each month. We select a contribution and feature the community member the following month.

Power BI Dev Camp - Developing with .NET Core

Power BI Dev Camp - Developing with .NET Core

Learn how to develop custom web applications for Power BI using .NET Core 3.1 and .NET 5.

Top Solution Authors
Top Kudoed Authors