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! Learn more

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
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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