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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Alex1988
Helper I
Helper I

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
v-jayw-msft
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
v-jayw-msft
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.
amitchandak
Super User
Super User

@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

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.