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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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.

Top Solution Authors
Top Kudoed Authors