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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
LewisH
Helper II
Helper II

Calculating a difference Overtime

I Have 2 Measures named 'Request' and 'Resolved'. These Values are linked to a datekey so I can view the values for every month. 

 

I want a new measure which will record the difference between these values Each month. In the below picture for example I would expect to see 

 

        | Request | Resolved | New Measure 

April |       78            43                  35

May  |     139          119                 55

June |       41            46                  50

 

The calcualtion is New Measure =  Request - Resolved + New Measure(Previous Month)

 

I tried something like this but it was very far from working

measure = calculate([request]-[resolved], filter(all(DateKey), DateKey[Date] <= max(DateKey[Date])))

 

 

3 REPLIES 3
v-ljerr-msft
Microsoft Employee
Microsoft Employee

Hi @LewisH,

 

If I understand you correctly, the formula below should work in your scenario. Smiley Happy

New Measure =
[request] - [resolved]
    + CALCULATE ( [request] - [resolved], PREVIOUSMONTH ( Table1[datekey] ) )

 

Regards

Thanks, However this doesn't seem to factor in the previous months values... It calculates the Requested - Resolved correctly, but no addition of the previous month

 

Hi @LewisH,

 

Could you post your table structures with some sample/dummy data, so that we can further assist on this issue? It's better to share a sample pbix file. You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading. Smiley Happy

 

Regards

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.