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!View all the Fabric Data Days sessions on demand. View schedule
Hi Experts
Need a DAX Measure based on Pdate (purchase date) to subtract the corresponding DDate value - as shown below i have two Pdate values over two weeks. Week Starting monday 21/09/2020 and week starting 28/09/2020. for those Pdate i have certain Ddate value - as shown below i want to be able to subtract the Orange values from the Blue vales for the correponding Ddate
Note if in the case you have no corresponding DDate based on Pdate as shown RED then zero
Both PDate and Ddate are in the same table - happy if a calculated column meaure works best
See image Below.
Sample Date in excel
https://www.dropbox.com/scl/fi/xhkbti01s3r7xqz4csk5g/Book1.xlsx?dl=0&rlkey=ic2tviq3cgfm1ir72220e1ac4
Hi @Anonymous ,
A small question, why did 2671 minus 2929 on September 21, but the next line starts with 3695 minus 3972 on September 28? I hope you can understand my doubts, I mean the blue area and the orange area, on what logic do you distinguish again?
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
HI Stephen t- typo on my part red box date 21.09.20 should be 28.09.20
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!