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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi All,
I am currently trying to figure out a formular for a given time period e.g. Jan 3rd - today. Important is that it will update automatically, meaning today will always be the actual today date.
The chosen period will then affect the table, but there are no dates included).
I am currently working with the dates as a slicer and the format between to have a timeline, but this is not automatically updating.
It would be great, if someone could help 🙂
Thanks a lot in advance
Hi @SLHVS_8 ,
Please create the Dates table.
Dates = CALENDAR ( DATE ( 2022, 1, 1 ), TODAY () )
Then create the "After" type slicer.
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@SLHVS_8 , if you need Cumulative
Switch Period =
var _max = if(isfiltered('Date'),MAX( 'Date'[Date]) , today())
var _min = Minx(ALLSELECTED('Date'),'Date'[Date])
return
CALCULATE([net] ,DATESBETWEEN('Date'[Date],_min,_max))
MTD
MTD =
var _max = if(isfiltered('Date'),MAX( 'Date'[Date]) , today())
var _min = eomonth(_max,-1)+1 ,
return
CALCULATE([net] ,DATESBETWEEN('Date'[Date],_min,_max))
fin YTD
This FYTD=
var _max = if(isfiltered('Date'),MAX( 'Date'[Date]) , today())
var _min =if( Month(_max) <4 , date(year(_max)-1,4,1) ,date(year(_max),4,1)), //FY April -March
return
CALCULATE([net] ,DATESBETWEEN('Date'[Date],_min,_max))
YTD=
var _max = if(isfiltered('Date'),MAX( 'Date'[Date]) , today())
var _min =eomonth(_max,-1*MONTH(_max))+1
return
CALCULATE([net] ,DATESBETWEEN('Date'[Date],_min,_max))