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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
nuriac
Helper III
Helper III

Distribute an amount between two dates

Hello

I would like to know which formula I must use in order to distribute the amount (of an order) between two dates, the date of start and the end date of the service.

The idea is that having an amount and the start and end date, because you know what amount I will bill each month.

Example:

Order 1: 100,000 euros; start 1/11/2020 and end 1/11/2021

although I've seen some post with similar information, I haven't been able to apply it.

Thank you

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@nuriac , Check if the attachment can help you.

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@nuriac , Check if the attachment can help you.

It puts the correct values to me, but they only come out in one month, for example if an order lasts from January to May, I only get values for that order in the month of January. The January value is correct, but I lack data in the other months.

Value by day of Month ? CALCULATE(SUMX(SUMMARIZE(filter(CROSSJOIN(CALENDAR,'SELL ORDERS'),CALENDAR[Date] >'SELL ORDERS'[Date Shipping]&& CALENDAR[Date]<' 'SALES ORDERS'[End Date]),'SELL ORDERS'[Sales Order No],CALENDAR[Date],'SALES ORDERS'[[Measures]].[ Expected Billing]]],'SALES ORDERS'[Shipping Date],'SALES ORDERS'[End Date]),DIVIDE('SALES ORDERS'[[Measures]].[ Expected Billing]]],DATEDIFF('SALES ORDERS'[Shipping Date],'SALES ORDERS'[End Date],DAY)+1)))

Solved.

It had related the calendar to the start date and therefore did not distribute correctly between the months. Removing the relationship has been perfect.

Thank you

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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