Forum Discussion

Mark_Berry's avatar
Mark_Berry
Helper I
3 years ago
Solved

Moving End date targets.

Hello, I have to create a visualisation which tracks how two construction tasks and their completion dates are relative to each other. The first task completetion end date will have an effect on th...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Mark_Berry 

    You can refer to the following soultion.

    Sample data 

    The relationship between tables

    Then create a measure

     

    Measure = var a=CALCULATE(SELECTEDVALUE('Taskname'[end date]),'Taskname'[TaskName]=1)
    var b=CALCULATE(SELECTEDVALUE('Taskname'[start date]),'Taskname'[TaskName]=2)
    return IF(AND(SELECTEDVALUE('Task_itm'[Date])>=a,SELECTEDVALUE('Task_itm'[Date])<=b)=FALSE(),SUM('Task_itm'[Value]))

     

     

    Output

    If the information above cannot meet your requirement, can you provide some sample data or picture and the expected result you want?

     

    Best Regards!

    Yolo Zhu

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