Forum Discussion

lmperplies's avatar
lmperplies
Regular Visitor
2 years ago
Solved

Calculate Decreasing Total minus total completed

Hi there -    I am trying to build a graph that shows the decreasing number of items that need to be completed by date. I need to show a graph that show the decreasing total by the x completed over...
  • 123abc's avatar
    123abc
    2 years ago

    You can use the following modified measure:

     

    DecreasingTotal =
    VAR InitialTotal = 2456
    VAR CurrentDate = MAX('Query - All'[data.End])

    RETURN
    InitialTotal -
    CALCULATE(
    COUNTROWS(FILTER('Query - All', 'Query - All'[data.End] <= CurrentDate && 'Query - All'[SUBCLASS] = "Breaker" && 'Query - All'[data.Status] = "Closed"))
    )

     

    This measure calculates the initial total minus the count of completed items up to the current date. It uses the FILTER function to filter the data for each date, and the condition 'Query - All'[data.End] <= CurrentDate ensures that only the items completed on or before the current date are considered.

    Make sure to replace 'Query - All' with the actual name of your table. Add this measure to your visualizations, and it should display the decreasing total of items over time as you specified.

     

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

     

    In case there is still a problem, please feel free and explain your issue in detail, It will be my pleasure to assist you in any way I can.