Forum Discussion

netanel's avatar
netanel
Icon for Post Prodigy rankPost Prodigy
4 years ago
Solved

A simple formula but the data structure is different

Hello everyone
I have this formula: 

Diff$ Budget = [MTD Sales] -[MTD Sales for Budget 2021]
Seemingly it is simple but the numbers are incorrect
 
It works for me when I do a month less a month earlier
Here:
Diff $ = 'Sheet1'[MTD Sales]-[last MTD Sales]
 
Could it be that in the budget it does not work for me because of the structure of the data?
Attaches a photo
 
  • Hi netanel 

     

    Please download this file:

    https://gofile.io/d/X9hGid

     

    Let me know if you have any questions.

     

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

    Appreciate your Kudos!!

     

6 Replies

  • Hi netanel 

     

    Do you have any columns with dates in your table?

    If yes, try using TOTALMTD to find MTD and then add Date Source="Budget 2021" to the filter section to find the "MTD Sales for Budget 2021".

    Something like this:

     Diff$ Budget = TOTALMTD(SUM([Net USD]),[Date Column])-TOTALMTD(SUM([Net USD]),[Date Column],[Date Surce]="Budget 2021")


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

    Appreciate your Kudos!!

     

    • netanel's avatar
      netanel
      Icon for Post Prodigy rankPost Prodigy
      In general I think this is really the way to a solution for me
      (I have a DIM table of dates)
      I try according to what you have written and something falls
      This is the formula I write
       
      Diff$ Budget = TOTALMTD(SUM([Net USD]),'Revenues DB'[Date])-TOTALMTD(SUM([Net USD]),'Date'[Date],'Revenues DB'[Date]="Budget 2021")
       
       
       
      • VahidDM's avatar
        VahidDM
        Icon for Super User rankSuper User

        Hi netanel 

         

        Can you please share a sample of your data and connection between tables? [after removing sensitive data]

        More Important, can you please add more details on how you want to show the result?is that just a number or do you want to show that in a table?

         

        Appreciate your Kudos!!