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
How to show data within over 30 Days and less than 30 days from a specific day?
Solved! Go to Solution.
@blockobito , in case you are not using date as a legend on donut visual
Rolling 30 day = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date],MAX('Date'[Date]),-30,Day))
Rolling 30 to 60 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date],max(dateadd('Date'[Date],-30,day)),-30,day))
LTD(complete till date before 30 ) =
var _max = if(isfiltered('Date'),MAX( 'Date'[Date]) -30, today())
var _min = minx(all('Date'), 'Date'[Date]) // or minx(allselected('Date'), 'Date'[Date])
return
CALCULATE([net] ,DATESBETWEEN('Date'[Date],_min,_max))
Rolling Days Formula: https://youtu.be/cJVj5nhkKBw
In case you want to date as a legend, You need a slicer on an independent date table
//Date1 is independent Date table, Date is joined with Table
new measure =
var _max = maxx(allselected(Date1),Date1[Date])
var _min = _max -30
return
calculate( sum(Table[Value]), filter('Date', 'Date'[Date] >=_min && 'Date'[Date] <=_max))
Need of an Independent Date Table:https://www.youtube.com/watch?v=44fGGmg9fHI
Hi, @blockobito
If your problem has been solved, please accept the helpful reply as solution to close this thread, so that other community members will easily find the solution when they get the same issue.
Best Regards,
Community Support Team _ Eason
@blockobito , in case you are not using date as a legend on donut visual
Rolling 30 day = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date],MAX('Date'[Date]),-30,Day))
Rolling 30 to 60 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date],max(dateadd('Date'[Date],-30,day)),-30,day))
LTD(complete till date before 30 ) =
var _max = if(isfiltered('Date'),MAX( 'Date'[Date]) -30, today())
var _min = minx(all('Date'), 'Date'[Date]) // or minx(allselected('Date'), 'Date'[Date])
return
CALCULATE([net] ,DATESBETWEEN('Date'[Date],_min,_max))
Rolling Days Formula: https://youtu.be/cJVj5nhkKBw
In case you want to date as a legend, You need a slicer on an independent date table
//Date1 is independent Date table, Date is joined with Table
new measure =
var _max = maxx(allselected(Date1),Date1[Date])
var _min = _max -30
return
calculate( sum(Table[Value]), filter('Date', 'Date'[Date] >=_min && 'Date'[Date] <=_max))
Need of an Independent Date Table:https://www.youtube.com/watch?v=44fGGmg9fHI
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 38 | |
| 36 | |
| 30 | |
| 28 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |