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
Anonymous
Not applicable

Creating a table of projected revenue

Hello, I am working on a sales dashboard that will project out future revenue based on a table of projects. I am new to PowerBI so I wanted to get the community's input on how to approach this.  Here's how our data is current set up.

 

Our sales fact table, for example:

 

ProjectAmountLengthStart Date
Project 110024/1/2020
Project 225031/15/2019
Project 35016/17/2021

 

Then we have a table of "burn rates". Each project has a different length so there is a set of rates for each project length (rounded to the nearest year)

 

LengthQ1 Y1Q2 Y1Q3 Y1Q4 Y1Q1 Y2Q2 Y2Q3 Y2Q4 Y2Q1 Y3Q2 Y3Q3 Y3Q4 Y3
10.30.30.20.2        
20.150.150.10.10.150.150.10.1    
30.10.10.060.060.10.10.060.060.10.10.060.06

 

I am trying to create a new table that multiplies the project amount by the correct burn rate, based on the project length. I was thinking this might be a job for a calculated table, but again, I'm new to PBI so not sure.

 

ProjectQ1 Y1Q2 Y1Q3 Y1Q4 Y1Q1 Y2Q2 Y2Q3 Y2Q4 Y2Q1 Y3Q2 Y3Q3 Y3Q4 Y4
Project 115151010151510100000
Project 2252515152525151525251515
Project 31515101000000000

 

The final product would also account for the start date of the project, so we can see the total projected per quarter/year. We have a date table related to the sales fact table, so I was hoping this could be solved through the correct relationships in the data model.

 

 201920202021
 Q1 Y1Q2 Y1Q3 Y1Q4 Y1Q1 Y2Q2 Y2Q3 Y2Q4 Y2Q1 Y3Q2 Y3Q3 Y3Q4 Y4
Project 10000015151010151510
Project 2252515152525151525251515
Project 300000000001515
Total252515152540302535404540

 

I appreciate any tips. Thank you!

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

For anyone who's interested, I ended up with a solution that seems to be working. I found this post https://www.sqlbi.com/articles/analyzing-events-with-a-duration-in-dax/ from @AlbertoFerrari that got me pointed in the right direction. 

 

My sales fact table has a start and end date that corresponds with the period over which revenue needs to be calculated. I used that to generate a new table that has a row for every day the project is active. Then I created a measure to give me the amount per day which can then be summarized by month, quarter, year, etc.

The tricky part was applying a burn rate that varies over time since we assume that revenue will not be spread uniformly across the entire project but instead ramp up, slow down, and then ramp back up. I assume that the first 1/4 of the project will result in 30% of the revenue, the second and third 1/4's will each result in 20%, and the final 1/4 will result in 30%.

To achieve this I ranked each day of the project and then divide by the total number of days in the project. Then I created a burn rate measure based on that percentage that says: If % of total is less than 25%, burn rate is x%, if less than 75%, burn rate is x%, etc.

Then I can sumx my daily amount by my daily burn rate and the total will be correct whether the project is 5 days or 500 days. The final product shows projected revenue by date and can be drilled up/down from year to day. 

I suspect that some of my measures are less than ideal but it seems to be working. If anyone has dealt with a similar problem and wants to chat let me know!

View solution in original post

3 REPLIES 3
v-xicai
Community Support
Community Support

Hi @Anonymous ,

 

>>I am trying to create a new table that multiplies the project amount by the correct burn rate, based on the project length.

 

You can create measure like DAX below.

 

Measure1=
var Amount= CALCULATE(SUM('sales fact'[sale]),FILTER(ALLSELECTED('sales fact'), 'sales fact'[Project] =MAX('sales fact'[Project])&&'sales fact'[Length] =MAX('sales fact'[Length])&&YEAR('sales fact'[Date]) =YEAR(MAX('sales fact'[Date]))&&ROUNDUP(MONTH('sales fact'[Date])/3,0)=ROUNDUP(MONTH(MAX('sales fact'[Date]))/3,0)))
var Rate= CALCULATE(MAX('burn rates'[Rate]),FILTER(ALLSELECTED('burn rates'), 'burn rates'[Length] =MAX('burn rates'[Length])&&YEAR('burn rates'[Date]) =YEAR(MAX('burn rates'[Date]))&&ROUNDUP(MONTH('burn rates'[Date])/3,0) =ROUNDUP(MONTH(MAX('burn rates'[Date]))/3,0)))
return
Amount*Rate

If I misunderstood it, could you please share your sample data or desired output screenshots for further analysis, you can also upload sample pbix to OneDrive and post the link here. Do mask sensitive data before uploading.

 

Best Regards,

Amy

 

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

Anonymous
Not applicable

Hi @v-xicai, Thank you for your suggestion. I wasn't able to test out the measure you shared because it doesn't quite match up how my data is modeled. The burn rate table doesn't have a single date, but rather a list of project lengths in years, and then a corresponding rate for each quarter. I created a sample pbix file with the same data model and am hoping that you can take a look.

 

sample project revenue report.pbix

 

Here is an example of what the final product should look like (not exactly the right amounts, but basically showing the labor costs * burn rate (based on period of performance start date) for each quarter that the project will occur. 

 

Proposal NameLabor CostsProbability (%)Period of Performance StartPeriod of Performance EndProject Duration (months)Q1 2019Q2 2019Q3 2019Q4 2019Q1 2020Q2 2020Q3 2020Q4 2020Q1 2021Q2 2021Q3 2021Q4 2021
Proposal-00494 $          199,225409/1/20199/1/202124   $      39,844.96 $      39,844.96 $     39,844.96 $     39,844.96 $     39,844.96 $     39,844.96 $     59,767.44 $     59,767.44 $     39,844.96 $     39,844.96
Proposal-00495 $       3,046,0734010/1/202010/1/202560        $  609,214.60 $  913,821.90 $  913,821.90 $  609,214.60 $  609,214.60
Proposal-00485 $       2,060,2055011/29/201911/29/202236   $   412,041.00 $   412,041.00 $  618,061.50 $  618,061.50 $  412,041.00 $  412,041.00 $  618,061.50 $  618,061.50 $  412,041.00 $  412,041.00
Proposal-00045 $          299,10780               
Proposal-00473 $          965,660501/2/20198/2/202131 $   289,698.00 $   289,698.00 $   193,132.00 $   193,132.00 $  289,698.00 $  289,698.00 $  193,132.00 $  193,132.00 $  289,698.00 $  289,698.00 $  193,132.00 
Proposal-00466 $       1,016,20750               
Proposal-00247 $       2,598,2154010/31/20192/29/20204   $   519,643.00 $   519,643.00 $  779,464.50 $  779,464.50 $  519,643.00     
Proposal-00230 $       3,260,558801/1/20205/1/202452   $   652,111.52 $   652,111.52 $  978,167.29 $  978,167.29 $  652,111.52 $  652,111.52 $  978,167.29 $  978,167.29 $  652,111.52 $  652,111.52
Proposal-00432 $             75,44580               
Proposal-00482 $       1,409,58050               
Proposal-00441 $          230,967404/1/201910/1/202018  $      69,290.10 $      46,193.40 $      46,193.40 $     69,290.10 $     69,290.10 $     46,193.40 $     46,193.40    
Proposal-00405 $       1,366,085401/25/20197/25/202242 $   409,825.50 $   409,825.50 $   273,217.00 $   273,217.00 $  409,825.50 $  409,825.50 $  273,217.00 $  273,217.00 $  409,825.50 $  409,825.50 $  273,217.00 $  273,217.00
Proposal-00496 $       1,009,179409/1/20198/1/202123  $   302,753.70 $   201,835.80 $   201,835.80 $  302,753.70 $  302,753.70 $  201,835.80 $  201,835.80 $  302,753.70 $  302,753.70 $  201,835.80 $  201,835.80
Proposal-00493 $          407,4844012/2/201912/2/202124    $      81,496.80 $  122,245.20 $  122,245.20 $     81,496.80 $     81,496.80 $  122,245.20 $  122,245.20 $     81,496.80 $     81,496.80
Proposal-00498 $       2,469,093408/1/20198/1/202236    $   493,818.60 $  740,727.90 $  740,727.90 $  493,818.60 $  493,818.60 $  740,727.90 $  740,727.90 $  493,818.60 $  493,818.60
Proposal-00488 $          261,04890               
Proposal-00492 $          915,92740               
Proposal-00490 $             18,09440               

 

 

Anonymous
Not applicable

For anyone who's interested, I ended up with a solution that seems to be working. I found this post https://www.sqlbi.com/articles/analyzing-events-with-a-duration-in-dax/ from @AlbertoFerrari that got me pointed in the right direction. 

 

My sales fact table has a start and end date that corresponds with the period over which revenue needs to be calculated. I used that to generate a new table that has a row for every day the project is active. Then I created a measure to give me the amount per day which can then be summarized by month, quarter, year, etc.

The tricky part was applying a burn rate that varies over time since we assume that revenue will not be spread uniformly across the entire project but instead ramp up, slow down, and then ramp back up. I assume that the first 1/4 of the project will result in 30% of the revenue, the second and third 1/4's will each result in 20%, and the final 1/4 will result in 30%.

To achieve this I ranked each day of the project and then divide by the total number of days in the project. Then I created a burn rate measure based on that percentage that says: If % of total is less than 25%, burn rate is x%, if less than 75%, burn rate is x%, etc.

Then I can sumx my daily amount by my daily burn rate and the total will be correct whether the project is 5 days or 500 days. The final product shows projected revenue by date and can be drilled up/down from year to day. 

I suspect that some of my measures are less than ideal but it seems to be working. If anyone has dealt with a similar problem and wants to chat let me know!

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.