Forum Discussion

MalvikaBhasin's avatar
MalvikaBhasin
Helper III
2 years ago
Solved

Comparing data over years

Hi,   What is a good way to present data like below: The data will be comparitive analaysis kinds.        Regards Malvika
  • audreygerred's avatar
    2 years ago

    Hi! You could use a matrix and have the years and months from your date table in on columns, Account in for rows and the measures you want in values.

    For example, if you wanted to show your sales YoY% you could make a measure for sales:

    Sales = SUM('YourTable'[SalesField])

    Then, create a measure for YoY% (below assumes you have a date dim table marked as date table):

    Sales YoY% =
    VAR __PREV_YEAR = CALCULATE([Sales], DATEADD('Date'[Date], -1, YEAR))
    RETURN
        DIVIDE([Sales] - __PREV_YEAR, __PREV_YEAR)