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
CarlosElias
Frequent Visitor

How to calculate revenue for each month between two dates

Hello everyone.

 

I have been traying to create a model where I can forcast the next months or even years revenue, acording to the amount pay by each client in a monthly basis.


The data set that I have looks something like this, where each costumer have a promotional price for a number of months and after that he start paying a higher price until forever (3022) or in some cases for a year. Also a costumer may have from 1 to many products (Q), so the amount charge every month will be Q * Invoice, for each month bewteen the start and end date.

 

Captura.PNG

 
 

I wanna be able to visualize this behavior in a table like this, because the data set is around 500.000 rows long.

 

Captura1.PNG

If someone can help me I'll be so much grateful. I have been hitting my head to the wall for a few days with this.

 

Thanks in advanced.

 

ps: I already have a calendar table conected to the model.

1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

hi  @CarlosElias 

here is a similar post for you refer to:

https://community.powerbi.com/t5/Quick-Measures-Gallery/Periodic-Billing/m-p/409365

 

Regards,

Lin

Community Support Team _ Lin
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

4 REPLIES 4
v-lili6-msft
Community Support
Community Support

hi  @CarlosElias 

here is a similar post for you refer to:

https://community.powerbi.com/t5/Quick-Measures-Gallery/Periodic-Billing/m-p/409365

 

Regards,

Lin

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

This is exactly what I needed, such elegant solution that I've could never write it myself. Thanks A LOT!

Ashish_Mathur
Super User
Super User

Hi,

See if this technique helps - https://medium.com/dm-p/generating-rows-by-month-for-date-ranges-in-power-query-9baf62ed8e99.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi, thanks for your response.

 

I was able to perform the solution at least in power query, but when I press "Save and apply" the following message appears:

OLE DB or ODBC error: [Expression.Error] The argument 'increment' is out of range.

Any idea what this means?

 

Thanks again.

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.