I have a table where each Organization has a monthly sales target define by a Start and End date. An active sales target has a start date and a null end date (See OrgId 1). When a new sales target is created the end date is set on the old record and a new record with new start date and target (See OrdId 2).
OrgId | Start Date | End Date | Target |
---|---|---|---|
1 | 1/1/2018 | Null | 10000 |
2 | 1/1/2018 | 12/31/2018 | 12000 |
2 | 1/1/2019 | Null | 14000 |
I need to convert this to a new table of daily targets for each Organization from the start date to the end date. When the end date is null, then the end date should Coalesce to Todays date + 365.
Can this done using Dax in Power BI?