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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

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. 

 

BlueWhite111_0-1681130488864.png

 

Sample Date in excel
https://www.dropbox.com/scl/fi/xhkbti01s3r7xqz4csk5g/Book1.xlsx?dl=0&rlkey=ic2tviq3cgfm1ir72220e1ac4 

2 REPLIES 2
v-stephen-msft
Community Support
Community Support

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?

13.png

 

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
Not applicable

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

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.