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

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.

Reply
Guille2711410
Helper I
Helper I

CALCULATE between dates and parameters

Hello I want to calculate a value between 90, 120, 150 and 180 days. I use the following DAX formula: For example for 90 days it is: Accum_90days = CALCULATE ([M_Value], DATESBETWEEN (Calendar [Date], date (2020,9,30), date (2020,11,30)))

However, I want to change the fixed dates to dynamic dates and that those dates are always greater than my cutoff date of the data DATE CUT.

Calendar [Date]> CUT DATE

How can I do. I will appreciate your comments.

Regards

3 REPLIES 3
SteveCampbell
Memorable Member
Memorable Member

try:

 

Accum_90days = 
var _cutoff = [CutDate]

RETURN

CALCULATE (
   [M_Value], 
   DATESBETWEEN (Calendar [Date], 
      _cutoff - 90, 
      _cutoff
     )
)


Did I answer your question? Mark my post as a solution! Proud to be a Super User!


Connect with me!
Stay up to date on  
Read my blogs on  



Thanks Steve

My cut-off date 08/31/2020

I want to calculate the value in the next 90,120,150 and 180 days from the first day of the following month, in this case 09/01/2020 and from there accumulate the value for the next 90 days 11/30/2020.

Also if there would be the possibility of handling the number of days in the same formula.

Thank you very much

I tried your solution Steve but it did not work, I ask for assistance again with more information, I await a response. Thank you

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.