Forum Discussion

TexasXD1's avatar
TexasXD1
New Member
2 years ago
Solved

Using ALL but displaying only relevant rows

I am trying to create a visual that looks at work items, their associated work resources and displays a calculation based on their total hours assigned to jobs and weekly capacity hours to give me an...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi  TexasXD1 ,

     

    Maybe you can try formula like below to create measure:

    AvailableHours = 
    VAR TotalAssignedHours = CALCULATE(
        [TotalHours],
        ALL('WorkResources')
    )
    VAR TotalWeeklyCapacity = CALCULATE(
        [WeeklyCapacity],
        ALL('WorkResources')
    )
    RETURN
    TotalWeeklyCapacity - TotalAssignedHours
    RelevantResources = 
    CALCULATE(
        [AvailableHours],
        FILTER(
            'WorkResources',
            'WorkResources'[WorkItemID] = SELECTEDVALUE('WorkItems'[WorkItemID])
        )
    )

    Best Regards,
    Adamk Kong

     

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