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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Analitika
Post Prodigy
Post Prodigy

Fixed date range chart slider overiding report level filter

I have chart column 

CALCULATE([Profit],DATESINPERIOD('Date'[Date],LASTDATE('Date'[Date]),-12,MONTH) )
I need report level on dates to show other chart in two years ranges.
I need overide report level filter for get whole dates ranges for two charts wich display datesinperiod.
I need to spin (slide) this datesinperiod by one month in all dates ranges
2020-05-19_102600.png
 
How to do that?
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Analitika , Dateinperiod will create rolling , try like

 

Measure =
var _max = maxx(allselected('Date'),'Date'[Date])
var _min = date(year(_max)-2,month(_max),day(_max))
return
calculate([measure],filter(All(DATE), Date[Date] >=_min && Date[Date] <=_max))

or
Measure =
var _max = maxx(allselected('Date'),'Date'[Date])
var _min = date(year(_max)-2,1,1)
return
calculate([measure],filter(All(DATE), Date[Date] >=_min && Date[Date] <=_max))

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Analitika , Dateinperiod will create rolling , try like

 

Measure =
var _max = maxx(allselected('Date'),'Date'[Date])
var _min = date(year(_max)-2,month(_max),day(_max))
return
calculate([measure],filter(All(DATE), Date[Date] >=_min && Date[Date] <=_max))

or
Measure =
var _max = maxx(allselected('Date'),'Date'[Date])
var _min = date(year(_max)-2,1,1)
return
calculate([measure],filter(All(DATE), Date[Date] >=_min && Date[Date] <=_max))

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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