cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
atul-patil
Helper V
Helper V

Auto Select Previous month in Month Slicer

Hi All,

 

I am using Year and Month Slicer in dashboard.

 

The month it shows by the dashboard (By default month) is the month while published the dashboard.

 

for example, I have published the dashboard on December 2020, it will show always December 2020.

 

But my problem is that, it will show the previous month automatically on todays date.

For example on todays date, it needs to show Jan 2021 and it will change automatically while month change.

Date Issue in Sales dashboard.png

 

Please help me on this.

 

Thanks.

1 ACCEPTED SOLUTION
amitchandak
Super User IV
Super User IV

@atul-patil , You can select a previous month by default.

You need to work around to have a column in your date table

 

Month Type = Switch( True(),
eomonth([Date],0) = eomonth(Today(),-1),"Last Month" ,
eomonth([Date],0)= eomonth(Today(),0),"This Month" ,
Format([Date],"MMM-YYYY")
)

 

and select Last Month in Slicer

 

refer: https://www.youtube.com/watch?v=hfn05preQYA



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

2 REPLIES 2
amitchandak
Super User IV
Super User IV

@atul-patil , You can select a previous month by default.

You need to work around to have a column in your date table

 

Month Type = Switch( True(),
eomonth([Date],0) = eomonth(Today(),-1),"Last Month" ,
eomonth([Date],0)= eomonth(Today(),0),"This Month" ,
Format([Date],"MMM-YYYY")
)

 

and select Last Month in Slicer

 

refer: https://www.youtube.com/watch?v=hfn05preQYA



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

Thank You, It works for me.

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Get Ready for Power BI Dev Camp

Power BI Dev Camp - June 24th

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors
Top Kudoed Authors