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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
onqufist
Frequent Visitor

Dealing with daily reports, calculate prorated values in the report when spanning over month end.

Hi, 
I've been struggling with this the whole day and would like some help.

 

I have table with daily reports with a start_date_utc and finish_date_utc. The report includes values for distance travelled in each report. The report includes all vessels identified by the their imo numbers. My end report will be sliced by the vessel name or imo number. 
I'd like to calculate the total distance travelled for each month. I've created a date table, and calculated column in the main table to get just the date component from the datetime value of finish_date_utc.

the problem is that at the month end,  (and month beginning) the report spans over the month.
For the month end report, I'd like to get the value of distance travelled from the next report, which falls in the next month. The distance is to calculated for the report period, and added to the month end reported distance in a prorated value. 
For the beginning of the month, thus i'd like to calculate just the proportionate distance that is included in the current month.

for eg, if the report at the month end ended at 1600 hours, the distance travelled for the next 8 hours is to be calculated by first finding the next reported distance, say 200 miles in 15 hours, so the distance to be included in the month is 8*200/15.  

 

 
2 REPLIES 2
amitchandak
Super User
Super User

@onqufist , refer if this can help

 

Measure way
Power BI Dax Measure- Allocate data between Range: https://youtu.be/O653vwLTUzM

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thanks for the tip. Though I did come across your article before, haven't wrapped my head around how to effectively use it. 

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.