Forum Discussion

Ritaf's avatar
Ritaf
Icon for Responsive Resident rankResponsive Resident
7 years ago
Solved

running total target

Hi, i'm tryin to create a measure for monthly target based on toatal yearly target and accomplished by the slised period.  For exemple salesman have a rarget for year  - 1,000,000 $ until 04.04 he ...
  • parry2k's avatar
    parry2k
    7 years ago

    Ritaf something like this you can do and change as per your need

     

    Add new measure to calculate number of months

     

    Total Month = 
    VAR __today = TODAY() 
    VAR __eomDate = EOMONTH( __today, 0 )
    VAR __totalDaysInMonth = DAY( __eomDate )
    VAR __daysPassedInMonth = DAY( __today )
    VAR __totalMonthsPassed = MONTH( __today ) + DIVIDE( __daysPassedInMonth, __totalDaysInMonth )
    RETURN
        __totalMonthsPassed
    
    

     

    Add measure to perform calculation

     

    Running Total Target = 
    DIVIDE( SUM( Table[Target ] ) - SUM( Table[Sales] ), 12 - [Total Months] )

    You can combine all this in one if you want, totally your call.