Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Target based on last promotion/startdate

Hi All,   I've the following issue/question: I created a dashboard with target and results of sales employees. Each profession level has it own target. When an employee gets promoted, the target ch...
  • Anonymous's avatar
    Anonymous
    8 years ago

    Found a solution. The Dax was incredibly simple when I started working with a date from and a date till value.  See formula at the bottom.

    danextian your idea and M query helped me a lot! I used your method of calculating the date difference, but I used it for finding the next promotion date and subtract 1 day to create a Date Till column. This way i could use a list employees and their promotion date to generate the periods.

    Thanks for the replies!

    Target pm = CALCULATE(SUMX(Target;[Monthly Target])*DISTINCTCOUNT(Calander[Year - Month]);
        FILTER(Promtions;[Date from]<=STARTOFMONTH(Calander[Date].[Date]));
        FILTER(Promtions;[Date till]>STARTOFMONTH(Calander[Date].[Date])))