Forum Discussion

digitalau's avatar
digitalau
Frequent Visitor
6 years ago
Solved

Power BI Calculating Weekly Sum

I am trying to find Weekly Sum in a table , I have a pretty extensive Date table which uniquely identifies a Week. However, it's not working and I am not able to understand why .    What I want is ...
  • v-frfei-msft's avatar
    6 years ago

    Hi digitalau ,

     

    To use VALUES function should work.

     

    Measure = 
    CALCULATE (
        SUM ( 'Table'[values] ),
        FILTER ( ALL ( 'Table' ), 'Table'[date] <= MAX ( 'Table'[date] ) ),
        VALUES ( 'Table'[Wn] ),
        VALUES ( 'Table'[date].[Year] )
    )