Showing results for 
Search instead for 
Did you mean: 
Regular Visitor

Change of dates with slicer selection

Hi Guys,


Here is my problem.

I have a line graph with last 6 months data which is default, now when I select July automaticall the line graph should show past 6 months from July, simillary if I select May the graph automatically move to 6 months past from may. I should not consider the month I selected in the graph only the past 6 months from the month I selected.



Thanks in advance.

Super User IV
Super User IV

@Drake023 , Create a column like this in you date table and use that as filter


Month Type = Switch( True(),
eomonth([Date],0) <= eomonth(Today(),0) && eomonth([Date],0) >= eomonth(Today(),-6),"Last 6 Month" ,

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!


 This may not work as today is considered.I want last 6 months based on user selection year and month.

Community Champion
Community Champion


Make a copy of your dates table and don't create any relationship to it, make sure your have Month-Year Column, you create like 

Month Year = FORMAT('DATE'[Date], "Mmm YYYY")

Place that Month Year Field on a slicer for the user to choose, create the measure as


Past 6 Months = 
VAR _D = EDATE(MIN('Dates2'[Date]),-6) return
    MAX('DATE'[Date]) < _D ||  MAX('DATE'[Date]) > MIN('Dates2'[Date]),
    [Total Sales]


I selected Jan 2017, the chart shows the past 6 months


Screenshot 2020-09-23 113902.png


If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn

Helpful resources

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!


Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors