Forum Discussion

azakir's avatar
azakir
Icon for Resolver I rankResolver I
3 years ago
Solved

Calculate SUM based on different columns

Hi Guys.  

Feels like mental block, but I can't seem to work out a simple sum. 

 

So here's what I am after: 

A formula that should give me a sum of the budget based on dates, work oders. 

In the example below, for the same site, I would like 07/2022 sum to be 2850+200 = 3050 and 08_2022 sum to be 6050. 

When I try changing the column value to SUM, it gives a weird summation: 

 

Any help would be appreciated. Thank you

13 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi azakir 

    try

    CALCULATE(
        SUM(Table1[Model WO Budget]),
        FILTER(
            ALLSELECTED(Table1[WO_Status_Change_MK_Date])
        )
    )


    BR

    • azakir's avatar
      azakir
      Icon for Resolver I rankResolver I

      Thank Anonymous 

      But I am getting the following error: 

       

       

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi azakir ,

        Please try this instead

        CALCULATE(
            SUM(Table1[Model WO Budget]),
                ALLSELECTED(Table1[WO_Status_Change_MK_Date])
        )