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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Bone1897
New Member

Pro rating a cost based on start and end date using DAX

Hi all,

 

I have four columns, Circuit, Start Date, End Date and Cost. The period covered might be spanning over few months, for an instance Start Date might be 03/01/2023 and End Date 25/04/2023. I would like to pro rate the cost and to distribute it proportionally accross the whole period as per circuit and month.

 

I would like to limit the number of calculated columns and use measures mostly.

The part highlighted in yellow down on the photo is very important, because the charge is spread over 9 months, and the pro-ration is done based on the number of chargeable days for each month.

 

Thank you very much.Sample.png

1 REPLY 1
lbendlin
Super User
Super User

If you are prorating then you should prorate fairly, by number of days per month.

 

lbendlin_0-1680049438418.png

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors