Forum Discussion

Iarampatta's avatar
Iarampatta
Frequent Visitor
3 years ago
Solved

Forecast sales when there are multiple invoice dates

Hi - I am trying to build a sales forecasting dashboard for a consultancy business. They would like to be able to see monthly revenue based on invoiced date. Normally, projects are invoiced at the en...
  • whitch's avatar
    3 years ago

    I have realised this approach will only work properly if all your dimensions are in separate tables.  If you have a one-table model and don't fancy sweeping all your dimensions into separate tables, you could, in Power Query:

    1. Add an [Invoice Date] column which is just equal to [Completion Date]

    2. Add an [Invoice Value] column which is [Weighting] * [Min Budget]

    3. Add a [Row Type] column which is ="Normal" (so it's the same for every row).

    4. Create a new table in Power Query by referencing your existing table.  Call it 'upfront payments'.  Disable data-load for both tables so far.

    5. In 'upfront payments', delete the [Invoice Date], [Invoice Value], and [Row Type] columns

    6. In 'upfront payments', add an [Invoice Date] column which is just equal to [Start Date]

    7. In 'upfront payments', add an [Invoice Value] column which is (1-[Weighting]) * [Min Budget]

    8. In 'upfront payments', add a [Row Type] column which is ="Upfront Payment"

    9. Create a new table by appending those two tables together.  This is your new data.  Save & close.

    10.  Add a report-level filter on [Row Type]="Normal"

    11. Your revenue measure is now:

    Revenue = CALCULATE(SUM('yourtablename'[Invoice Value]), ALL('yourtablename'[Row Type]))