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.
I want to add all orders done by the customer exactly 1 year after first order. For example customerID 1000 first order was march 3 2006. I want to add all orders done up to march 3 2007.
Solved! Go to Solution.
Hi @ligalbert
You can refer to the following measure
Measure = var a=CALCULATE(FIRSTNONBLANK('Table'[OrderDate],0),'Table'[CustomerID]=SELECTEDVALUE('Table'[CustomerID]),REMOVEFILTERS('Table'))
return CALCULATE(SUM('Table'[Orders Order]),'Table'[OrderDate]>=a&&'Table'[OrderDate]<=EOMONTH(a,12)-(DAY(EOMONTH(a,0))-DAY(a)))
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @ligalbert
You can refer to the following measure
Measure = var a=CALCULATE(FIRSTNONBLANK('Table'[OrderDate],0),'Table'[CustomerID]=SELECTEDVALUE('Table'[CustomerID]),REMOVEFILTERS('Table'))
return CALCULATE(SUM('Table'[Orders Order]),'Table'[OrderDate]>=a&&'Table'[OrderDate]<=EOMONTH(a,12)-(DAY(EOMONTH(a,0))-DAY(a)))
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.