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

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.

Reply
ilcaa72
Helper IV
Helper IV

Find the Difference of each value vs previous month

i am struggling trying to create this simple calculation... i want to subtract the current months MatchedRate to the previous months match rate for each BankID. i want to create a Matrix with Dates in Columns and BankID in Rows showing the differences rom month to month for each bank

 

for starting at line 2, the Diff would be -.1

 

here is a link to the file. https://1drv.ms/u/s!Av69y58QJYzRjyE4igUTbHkFchba

 

 

difference.JPG

1 ACCEPTED SOLUTION
v-frfei-msft
Community Support
Community Support

Hi @ilcaa72,

 

I update the formula like this, then we can get the result as we excepted.

 

Monthly Difference = IF(ISBLANK(DATEADD(test[Date],-1,MONTH)),BLANK(),
SUMX(test,MAX(test[MatchedRate]))
- 
CALCULATE(SUMX(test,MAX(test[MatchedRate])),DATEADD(test[Date],-1,MONTH))
)

Capture.PNG

 

Also, Please check the pbix as attached.

 

https://www.dropbox.com/s/jbc01xatesb0giy/Difference%20in%20Month.pbix?dl=0

 

Regards,

Frank

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

1 REPLY 1
v-frfei-msft
Community Support
Community Support

Hi @ilcaa72,

 

I update the formula like this, then we can get the result as we excepted.

 

Monthly Difference = IF(ISBLANK(DATEADD(test[Date],-1,MONTH)),BLANK(),
SUMX(test,MAX(test[MatchedRate]))
- 
CALCULATE(SUMX(test,MAX(test[MatchedRate])),DATEADD(test[Date],-1,MONTH))
)

Capture.PNG

 

Also, Please check the pbix as attached.

 

https://www.dropbox.com/s/jbc01xatesb0giy/Difference%20in%20Month.pbix?dl=0

 

Regards,

Frank

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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