Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Tricky Subtraction based on PDate values

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 

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    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.           

    • Anonymous's avatar
      Anonymous
      Not applicable

      HI Stephen t- typo on my part red box date 21.09.20 should be 28.09.20