Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
99 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
110 | |
91 | |
84 | |
66 |