cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Last 3 months as Default on Chart/s that changes to desired month upon selection

Hi Guys, We have a report and the powers that be have requested they see the last three month on the chart as default but that they would like to be able to see any other selected dates through a slicer.

So when loading the app see the last three months but then maintain the ability through a pre-existing slicer to choose and alternative date selection. 

Any suggestions on how this can be achieved?

Thanks, 

Alex

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Hi @Alex1988 ,

 

Not sure if i understand you correctly, but you may check the following steps.

1# Create a table as below and use slicer column as slicer.

1.PNG

2# Create a measure like below.

Measure = IF(MONTH(TODAY())-MONTH(SELECTEDVALUE('Table'[date]))<SELECTEDVALUE(slicer[value]),SELECTEDVALUE('Table'[value]),BLANK())

3# Create the visual like below.

2.PNG3.PNG

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

2 REPLIES 2
Highlighted
Super User IV
Super User IV

@Alex1988 , Use relative date slicer

https://docs.microsoft.com/en-us/power-bi/visuals/desktop-slicer-filter-date-range

 

Create a column like this in you table

Month Type = Switch( True(),

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

and sort on

Month Year sort = FORMAT([Date],"yyyymm")

 

And select This Month, Last Month and 2nd Last Month

 

Or try this

https://www.youtube.com/watch?v=duMSovyosXE

 



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!

Highlighted
Community Support
Community Support

Hi @Alex1988 ,

 

Not sure if i understand you correctly, but you may check the following steps.

1# Create a table as below and use slicer column as slicer.

1.PNG

2# Create a measure like below.

Measure = IF(MONTH(TODAY())-MONTH(SELECTEDVALUE('Table'[date]))<SELECTEDVALUE(slicer[value]),SELECTEDVALUE('Table'[value]),BLANK())

3# Create the visual like below.

2.PNG3.PNG

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Community Conference

Microsoft Power Platform Communities

Check out the Winners!

secondImage

Create an end-to-end data and analytics solution

Learn how Power BI works with the latest Azure data and analytics innovations at the digital event with Microsoft CEO Satya Nadella.

Top Solution Authors
Top Kudoed Authors