Forum Discussion

Alicia_Anderson's avatar
Alicia_Anderson
Resolver I
4 years ago
Solved

Trying to write a Measure that projects future

I am trying to write a measure that uses other measures to create a projection line for a line chart.  I want to add a green dotted line that starts with the Previous_Sprint and adds the Use Vel for the remaining sprints.  

The first four columns below make up the chart above.   It is the Projected column below that I manually created within Excel to show what I am looking for.     (Previous_Sprint is a measure.  Use Vel is a column in Use_Vel table.)

SprintOrig EffortRTCurr EffortRTEffort-DoneRTPrevious_SprintUse VelProjected
PI2-1406407407PI2-2409 
PI2-2766785785PI2-2409785
PI2-310971258952PI2-24091194
PI2-415001769952PI2-24091603
PI2-519282163952PI2-24092012
PI2-623402571952PI2-24092421
PI2-727612961952PI2-24092830

 

Also, I would like to know if there is a way to not display the redundant data for the Effort-DoneRT field.  (This is a running total and since we have not started PI2-4 and beyond, all values are the same.) 

 

  • I was able to figure out a way to do both by myself.   May not be efficient, but it works.   

     

    1) First I had to create a numeric field instead of using text field.   (Sprint#, Current_Sprint#)

    2) Create a measure to capture points Done up to previous sprint.

    Effort-Done_Prev =
    CALCULATE([Effort-Done],
        FILTER(ALL('PI_Work'[Sprint#]), ('PI_Work'[Sprint#] < [Current_Sprint#])))
    3) Create a measure to determine future projected points.
    TVel =
    CALCULATE(sum(PI_Orig[UVel]),
         FILTER('PI_Work','PI_Work'[Sprint]>=[Current_Sprint]))
    4) Combine 2&3 together.
    Effort-Proj =
    [Effort-Done_Prev] + [TVel]
    5) Then I created a running total for above.
    Effort-ProjRT =
    CALCULATE([Effort-Proj],
        FILTER(ALLSELECTED('PI_Ref'[Sprint]),
            ISONORAFTER('PI_Ref'[Sprint], min('PI_Ref'[Sprint]), DESC))) 
    6) I created another measure that includes points only up to the Current Sprint.  
    Effort-Done_Curr =
    CALCULATE([Effort-Done],
        FILTER(ALL('PI_Work'[Sprint#]), ('PI_Work'[Sprint#] <= [Current_Sprint#])))
    7) Then I created a running total for above.
    Effort-Done_CurrRT =
    if([Effort-Done_Curr]<>Blank(),
    CALCULATE([Effort-Done_Curr],
        FILTER(ALLSELECTED('PI_Ref'[Sprint]),
            ISONORAFTER('PI_Ref'[Sprint], min('PI_Ref'[Sprint]), DESC))))
     

     

2 Replies

  • "It is the Projected column below that I manually created within Excel to show what I am looking for.  "

     

    What's the formula?

  • I was able to figure out a way to do both by myself.   May not be efficient, but it works.   

     

    1) First I had to create a numeric field instead of using text field.   (Sprint#, Current_Sprint#)

    2) Create a measure to capture points Done up to previous sprint.

    Effort-Done_Prev =
    CALCULATE([Effort-Done],
        FILTER(ALL('PI_Work'[Sprint#]), ('PI_Work'[Sprint#] < [Current_Sprint#])))
    3) Create a measure to determine future projected points.
    TVel =
    CALCULATE(sum(PI_Orig[UVel]),
         FILTER('PI_Work','PI_Work'[Sprint]>=[Current_Sprint]))
    4) Combine 2&3 together.
    Effort-Proj =
    [Effort-Done_Prev] + [TVel]
    5) Then I created a running total for above.
    Effort-ProjRT =
    CALCULATE([Effort-Proj],
        FILTER(ALLSELECTED('PI_Ref'[Sprint]),
            ISONORAFTER('PI_Ref'[Sprint], min('PI_Ref'[Sprint]), DESC))) 
    6) I created another measure that includes points only up to the Current Sprint.  
    Effort-Done_Curr =
    CALCULATE([Effort-Done],
        FILTER(ALL('PI_Work'[Sprint#]), ('PI_Work'[Sprint#] <= [Current_Sprint#])))
    7) Then I created a running total for above.
    Effort-Done_CurrRT =
    if([Effort-Done_Curr]<>Blank(),
    CALCULATE([Effort-Done_Curr],
        FILTER(ALLSELECTED('PI_Ref'[Sprint]),
            ISONORAFTER('PI_Ref'[Sprint], min('PI_Ref'[Sprint]), DESC))))