Forum Discussion

samto22's avatar
samto22
Frequent Visitor
6 years ago

Forecasting Flat Revenue.

Hello!
I've task to calculate projects forecasting revenue. We have project amount and need to break down this amount over project period.
Let's say project amount is 250k€ and project period is 24 months.
Conditions are:
  1. If any revenue received in period, show revenue;
  2. If revenue not received but we have historical percentage on that period, then calculate Forecasting Revenue by Historical Data = Project Amount x Percentage
  3. If we don't have historical percentage, then make flat calculation: FlatForecast = ForecastBalance/EmptyPeriods.
Here ForecastBalance = ProjectAmount-
ReceivedRevenue-RevenueForecastingByHistoricalData
 
My try is in first picture.
Second picture shows what results I get, but here is a problem that flat calculation is exceeding project duration limits, instead of stopping at period 24 it continues till max duration, which is for another project.
What could be the problem? Any suggestions are would be very appreciated.
 
 

7 Replies

  • sturlaws's avatar
    sturlaws
    Resident Rockstar

    Hi samto22,

     

    instead of sharing screen shots of your dax code, could you post the actual code?

     

    Cheers,
    Sturla

  • v-eachen-msft's avatar
    v-eachen-msft
    Community Support

    Hi samto22 ,

     

    Could you please share your sample data and excepted result to me if you don't have any confidential information. Please upload your files to OneDrive and share the link here.

     

    • samto22's avatar
      samto22
      Frequent Visitor

      Hi v-eachen-msft 

      Here is a link to my sample file: Projects 

       

      Seems I solved my above problem but now I'm facing another problem - how to link period(s) to Project YearMonth and show data in such manner:

       

      2020-01           4 492 €
      2020-02         25 343 €
      2020-03           5 791 €
      2020-04         13 093 €
      2020-05         19 523 €
      2020-06           8 084 €
      2020-07         25 594 €
      2020-08         15 571 €
      2020-09           7 030 €
      2020-10         31 079 €
      2020-11         22 937 €
      2020-12         12 784 €
      2021-01           6 961 €
      2021-02           4 812 €
      2021-03           4 812 €
      2021-04           3 600 €
      2021-05           4 812 €
      2021-06           4 812 €
      2021-07           4 812 €
      2021-08           4 812 €
      2021-09           4 812 €
      2021-10           4 812 €
      2021-11           4 812 €
      2021-12           4 812 €

       

      Any suggestions on solving this issue would be very appreciated. 

       

      Thanks!

      • v-eachen-msft's avatar
        v-eachen-msft
        Community Support

        Hi samto22 ,

         

        You could try this measure:

        Measure =
        FORMAT ( EDATE ( [mindate], SELECTEDVALUE ( Periods[Period] ) - 1 ), "yyyy-mm" )