First of all, I don't have much experience with Power BI and DAX.
I have question about calculating yearly income depend contract length and showing company year by year income.
Data is stored in Excel file and all contracts have information about contract_start (datetime), contract_end (datetime) and annual contract value (income).
So for example:
I have 5 contracts (A, B, C, D, E):
- A - end year 2019 (worth 1M/per year €)
- B - end year 2019 (worth 1M/per year €)
- C - end year 2020 (worth 2M/per year €)
- D - end year 2021 (worth 1M/per year €)
- E - end year 2022 (worth 5M/per year €)
So my end result must be (sum of annual contract income per year):
- 2019 = A+B+C+D+E
- 2020 = C+D+E
- 2021 = D+E
- 2022 = E
Edit: Additional: It's possible to also include contracts, which have blank contract_end? If contract has blank contract_end it means that contract is valid until cancelation.
So I have beside contract A, B, C, D, E also 2 contract, F and G which have "blank" contract_end and each it's worth 1M/year.
- A - end year 2019 (worth 1M/per year €)
- B - end year 2019 (worth 1M/per year €)
- C - end year 2020 (worth 2M/per year €)
- D - end year 2021 (worth 1M/per year €)
- E - end year 2022 (worth 5M/per year €)
- F - until cancelation (worth 1M/per year €)
- G - until cancelation (worth 1M/per year €)
It's possible to add "virtual" 2M€ to each year in chart (sum of F and G)?