Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Help with something super simple

I am just learning, but want to create year over calculations.   Data looks just like this Model           Year            Value black              2017            5 blue                2016    ...
  • v-ljerr-msft's avatar
    v-ljerr-msft
    8 years ago

    Hi Anonymous,



    For example in excel, it is a simple =SUMIF(B:B,"2017",D:D).  Give me the sum of column D, but only if Column b contains the data for 2017.

    The formula below to create a measure is for your reference. :smileyhappy:

    Sales 2017 = CALCULATE(SUM('Table1'[Value]),FILTER('Table1','Table1'[Year]=2017))

    Note: You'll need to replace 'Table1' with your real table name.

     

    Regards