Here we have a target table provided at the year level and we would like to display the target at the day level also we would like to see YTD Targets.
The target table has 2 columns: Target and Year.
We have added 2 new columns to the target table year start date and the year end date (Named it Date). As we are using the calendar year, we have hardcoded these to January and December month. You can change these based on your financial year.
Start Year = Date(Target[Year],1,1)
Date = date(Target[Year],12,31)
We also added a date table. this table has 2 columns date and year.
Date = ADDCOLUMNS(CALENDAR(date(2017,01,01),date(2020,12,31)),"Year", year([Date]),"Month Year", FORMAT([Date],"YYYYMM"))
We have joined both the tables on year columns. This will make the target on one side of the Many to one Relation.
We created a new table using the summarize function. In that we created a new column, That divides the target by the number of days in the year. We already have taken the start date and end date in our table and we have used these two to find date difference in days. This has given us a daily target Table.