Forum Discussion

ngomes's avatar
ngomes
Helper II
2 years ago
Solved

PREVIOUSMONTH negative values

Good morning, I need your help with a dax formula

 

I have a dax measure that calculates the difference between the predicted value and the realized value

and I would like to add the negative values from the previous month to add to the predicted value of the month

 

Can anyone help me with this formula?

7 Replies

  • some_bih's avatar
    some_bih
    Community Champion

    Hi ngomes more details needed about measures and model to provide possible solutions. On adding negative value/s is it according rule/s or fixed amount...

    • ngomes's avatar
      ngomes
      Helper II

       

      Knowing that in January customer A had a realized value of -€536,588.56, I want to add this value to the expected value for the month of February.

      the monthly objective would be €2,181,818.18 + €536,588.56

       

      thanks for any help you can give me

  • some_bih's avatar
    some_bih
    Community Champion

    Hi ngomes in your model, all inputs are on monthly level, both Excpected and billing?

    It seems you need to calculate per customer and per month TOTAL Year to date difference, and also per month monthly?

    • ngomes's avatar
      ngomes
      Helper II

      in your model, all inputs are on monthly level, both Excpected and billing?

       

      R: Yes, I have the calendar table linked with sales and expected values

       

      It seems you need to calculate per customer and per month TOTAL Year to date difference, and also per month monthly?

      R: I need to calculate the negative value from the current year and the previous month so that later I can add it to the expected value of the current month

      • some_bih's avatar
        some_bih
        Community Champion

        Hi ngomes to provide some possible solution, please share your model with inputs and expected outputs.

        On link there is idea how to use power bi to deal with budget