Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Help with calculated column

Hi, I have this table, I want to grab the Monthly value of ID 1 :       And put it in a calculated column for every ID (taking into account the Month) like this:     How can I achi...
  • FrankAT's avatar
    5 years ago

    Hi Anonymous 

    what about this solution:

     

     

    X = CALCULATE(SUM('Table'[Value]),FILTER(ALLEXCEPT('Table','Table'[Month]),'Table'[ID] = 1))

     

    With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
    FrankAT (Proud to be a Datanaut)

  • Ashish_Mathur's avatar
    5 years ago

    Hi,

    This calculated column formula works

    =CALCULATE(SUM(Data[Value]),FILTER(Data,Data[ID]=1&&Data[Month]=EARLIER(Data[Month])))

    Hope this helps.