Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Calculating Week by Week Figures from Weekly Collected YTD Data

Hi All, 

 

Hoping someone can help. 

I have a YTD Data set which is gathered on a week by week basis.

I want to calculate the weekly value however I need it for each Area in the data set and not an overall value. 

You can see how far I have got below using the following DAX formula. Could do with a little help on how to make sure it displays the correct value for each Area. 

 

Weekly Billable Hours =
VAR PREV_Value =  
    CALCULATE(Max('Act Weekly PBCS'[Billable Hours]),
    'Act Weekly PBCS'[End of Week] < EARLIER('Act Weekly PBCS'[End of Week]),
    REMOVEFILTERS('Act Weekly PBCS')
 )
Return
        If(
            WEEKNUM('Act Weekly PBCS'[End of Week]) =41 ,
            'Act Weekly PBCS'[Billable Hours],
            'Act Weekly PBCS'[Billable Hours]-PREV_Value
        )

 

 

 

Hoping someone can help.