Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi all,
I wish to create a model with two date slicers (current and previous). Ideally, I want when I select on a date slicer between e.g 1/05/2022 to 31/05/2022 the previous date should dynamically move one month before. In other pages, I would like the previous date to be within the same period selected. For example, if i select 2 months on current date slicer, pevious should be automatically show 2 months before the end date of the current.
I have all the measures such as previous two months sales but all i need is to show the dynamic interactivity between previous and current date slicers. I've tried edit interactions but it seems not to work for my scenario. I'm using two date sliders with between.
Please help
@Anonymous , try one of three options
//previous period month
Same Date range last period =
var _diff = datediff(MIN('Date'[date]),max('Date'[date]),Month)+1
var _p_st_date = MINX('Date',DATEADD('Date'[date],-1*_diff,Month))-1
var _p_end_date = MAXX('Date',DATEADD('Date'[date],-1*_diff,Month))-1
Return
CALCULATE(sum(Sales[Sales Amount]),all('Date'[date]),'Date'[date]>=_p_st_date && 'Date'[date]<= _p_end_date
)
Same Date range last period Month =
var _diff = datediff(MIN('Date'[date]),max('Date'[date]),Month)+1
Return
CALCULATE(sum(Sales[Sales Amount]),dateadd('Date'[date],-1*_diff,Month))
Same Date range last period =
var _diff = datediff(MIN('Date'[date]),max('Date'[date]),Month)+1
var _p_st_date = Eomonth(MINX('Date','Date'[date], _1* _diff)-1
var _p_end_date = Eomonth(MAXX('Date','Date'[date], _1* _diff)
Return
CALCULATE(sum(Sales[Sales Amount]),all('Date'[date]),'Date'[date]>=_p_st_date && 'Date'[date]<= _p_end_date
)
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 21 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 35 | |
| 31 | |
| 20 | |
| 13 | |
| 11 |