Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply

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



Snag_4b712b.png

 

 

 

Snag_59efed.png

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 3
Kishore_KVN
Super User
Super User

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!!

Snag_7e1cf9.png


I am running into this Error when trying to replicate your measure 

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

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.