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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Forcemark
Regular Visitor

Calculating monthly revenue from a start and end date range

Hi,

 

Currently I am tracking revenue from contracts in excel. I have a start and end date and then use the formula below to get the monthly revenue from the contracts in order to be able to forecast our total monthly revenue.

=(IF(F1>=B2,IF(C2="",$D2,IF(F1<=C2,D2,0))))

 

However I would like to be able to step away from excel and get the monthly revenue directly from connecting the datbase to Power BI. Would this be possible? 

 

Some assumptions:

If a start date or end date is in the middle of the month the revenue will last the whole month, there are no calculations needed based on number of days, therefore in Power BI I have adjusted all dates to be "end of month". 

 

 

Thanks,

 

biexample.JPG

 

2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@Forcemark,

 

One way is to add a calculated table.

https://community.powerbi.com/t5/Developer/Dax-Help-Create-table-with-variable-of-lines-according-to...

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

Thank you v-chuncz-msft, I'll have a look at that. Is it possible to get Calenderauto to create a table by year and months instead of days?

 

I've so far calculated the contracts which will I need for another excercise, I based it on the link below but changed the formula to count contracts without an end date.   

           ( Table1[Start Date] <= currentDate
                && ((Table1[End Date] >= currentDate
                || (Table1[End Date] = BLANK() )

 

https://community.powerbi.com/t5/Desktop/Calculating-a-monthly-employee-count-from-a-start-and-end-d...

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.