Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Formatting Year and Calendar Week

Hello,    I have a data set, which includes a column for year (2018 and 2019) and a column for calendar week (1,2,3...)   Is it possible to format the columns so that they are recognized as year ...
  • Anonymous's avatar
    Anonymous
    7 years ago

    Hi,

    have you a Year dimension table? Or have you just one large table?

     

    If you have a table Calendar with the list of Year, you can create these measures:

    TotalValue = SUM(Value)

    TotalValue PY = CALCULATE([TotalValue], FILTER( ALL(Calendar), Calendar[Year] = MAX(Calendar[Year])-1))

    Total Value YoY = TotalValue - TotalValue PY

    % vs TotalVaue PY = DIVIDE(Total Value YoY,  TotalValue PY)