Forum Discussion

yazenbarakat123's avatar
3 years ago

Stop Plotting Line on Chart when Activity is completed

Hello I am trying to have my line chart stop plotting when an activity is marked as completed Bellow is a sample Data set of a Milestone Schedule Report I am working on,



I am using the custom Micirosoft Certfied Visual Milestone Trend Analysis By Nova Silva



 

 

 



once the acticity status is marked 1 it indicates that the activity has been completed and there is no longer need to plot the rest of the dates on the line chart  so in the above example the line would stop at the arrow mark


how do i write a dax filter measure to accomplish this?


Please help!

Appreciate all the help in advance!  

  

3 Replies

  • Hello yazenbarakat123 ,

    I am not sure with the approach you made for the line visual. But you can try below measure by tweeking it as per your data design.

    Measure = IF
                (
                    CALCULATE(MAX(Data[Activity Status]),ALLEXCEPT(Data,Data[Miestone Description]))>0,
                    CALCULATE(COUNT(Data[Reporting Date]),FILTER(All(Data),Data[Activity Status]=1 && Data[Reporting Date]<=MAX(Data[Reporting Date]))),
                    CALCULATE(COUNT(Data[Reporting Date]))
                )

     

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

    • yazenbarakat123's avatar
      yazenbarakat123
      Helper I

      Sorry for the confusion , for the line chart I am using  the custom Micirosoft Certfied Visual Milestone Trend Analysis By Nova Silva