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
Here One filter is compared with marked in red rectangle and one is a date slicer.
The current session comes from the date slicer and the previous session comes from compared with the slicer.
We are comparing current data with the previous session. Data like last month, last week, last year. we choose dates in slider and then choose compared with so both data comes and we find out difference and percentages according to it.
Now We want to give flexibility to the user that if data is compared monthly then the date range dates difference will be 30 days no other dates can be selectable.
Or any other suggestion
please welcome.
@vikramsharma184 , Last period using same date range diff
same period based on date range
Last Period =
var _max =maxx(allseleceted(date),date[date])
var _min =maxx(allseleceted(date),date[date])
var datediff1 = datediff(_min,_max,day)
var _maxX = _max-datediff1
var _minX = _min -datediff1
return
CALCULATE(SUM(Sales[Sales Amount]),filter(all(date,date[date]<=_maxX &&date[date]>=_minX)))
You want to compare two slicers
How to use two Date/Period slicers
We want to give an option of comparison to date slicer
like default which is already given if we select based on monthly then the date range should become min date range to max date range will be only any 30 days after it goes to compared with slicer. All dates except date range in slicer disable. we are fixing the min and max date slicer with a 30days gap in the monthly comparison.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 46 | |
| 42 | |
| 23 | |
| 18 |
| User | Count |
|---|---|
| 193 | |
| 123 | |
| 99 | |
| 67 | |
| 49 |