Forum Discussion

gizattos's avatar
gizattos
Regular Visitor
6 years ago
Solved

Sum by weeknumber

Hi guys,   I'm trying to create a column based on last week value with DAX, I already create weeknumber column. I tryed this code : lastweek value = CALCULATE(SUMX(Tabela,Tabela[Insight]),FILTER(A...
  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi gizattos ,

     

    You can use EARLIER() function

    Column = CALCULATE(SUM('Table'[insight]),FILTER('Table','Table'[weeknumber]=EARLIER('Table'[weeknumber])-1))

     

     

    Best Regards,

    Jay

     

    Community Support Team _ Jay Wang

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