Forum Discussion

sprao's avatar
sprao
Icon for Helper I rankHelper I
3 years ago
Solved

Power BI S-Curve

Hi

In the below image showing Actual values if not avalaible showing 0 in i need to show  insted of 0 Previois Cumilative value.

 

 

 

S-Curve(Actual) =
VAR A = CALCULATE(
            COUNT(Tasks[TaskActualFinishDate]),
            FILTER(ALLSELECTED(Tasks),
                        (Tasks[TaskFinishDate]) <= MAX(Tasks[TaskActualFinishDate]
                  )
            ))
VAR B = CALCULATE(COUNT('TaskBaselines'[TaskBaselineFinishDate]),
            FILTER(
                       ALLSELECTED('TaskBaselines'),
                       MAX(TaskBaselines[TaskBaselineFinishDate])
                  ))

VAR S_Curve = (A / B) * 100
   RETURN S_Curve
 
 
please help me return value if Var A  is empty then show previous Cumilative value
 
 

 

 

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi sprao ,

     

    According to your code, I suggest you to try to create a Calendar table with continuous date in it.

    For reference:

    https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions

    Then create the measure by [Date] in this Calendar table.

     

    Best Regards,
    Rico Zhou

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.