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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
sherwood
Helper I
Helper I

Calculate total sum between date and today's date

Likely an easy one for a Power BI Guru, but my calculation is not returning the correct result.

I have data like the below table, with Device Returned Date coming from a separate data source. 

sherwood_0-1678122189156.png

The Cost Since Return column (that I'm trying to write a calculation for) is shown above as my desired result.

I'm trying to write a calculation that can give me totals like:

sherwood_1-1678122368453.png



I'm not sure what I'm doing wrong but my calculation is showing incorrect figures between Service Cost and Cost Since Return, giving me bogus totals. 

Any help greatly appreciated. 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @sherwood ,

 

According to your description, here are my steps you can follow as a solution.

(1) My test data is the same as yours.

(2) We can create a calculated column.

Cost Since Return = IF(EOMONTH([Billing Month],0)>EOMONTH([Device Returned Date],0)&&[Device Returned Date]<>BLANK(),[Service Cost],0)

(3) Then the result is as follows.

vtangjiemsft_0-1678265089976.png

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @sherwood ,

 

According to your description, here are my steps you can follow as a solution.

(1) My test data is the same as yours.

(2) We can create a calculated column.

Cost Since Return = IF(EOMONTH([Billing Month],0)>EOMONTH([Device Returned Date],0)&&[Device Returned Date]<>BLANK(),[Service Cost],0)

(3) Then the result is as follows.

vtangjiemsft_0-1678265089976.png

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

Many thanks, this works perfectly!

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors