Forum Discussion

bolabuga's avatar
bolabuga
Icon for Helper V rankHelper V
9 years ago
Solved

Metric to use on a List(table?) Chart.

Hello, i have the sample table on the image.   I did the following metric to use on a grouped bar chart: INDICATOR 2016 % = VAR MONEYTYPE2015 = CALCULATE(SUM('SAMPLE'[MONEY]);FILTER('SAMPL...
  • v-sihou-msft's avatar
    v-sihou-msft
    9 years ago

    bolabuga

     

    In your scenario, you also have client column in your table, you should also add "Table[Client]=EARLIER(Table[Client])" in your filter.

     

    Previous Year Value = CALCULATE(SUM(Table[Value]),FILTER(Table,Table[Year]=EARLIER(Table[Year])-1 && Table[Month]=EARLIER(Table[Month]) && Table[Client]=EARLIER(Table[Client])))

     

     

    Since you need to do this comparison in matrix, it will generate columns dynamically and always aggregate on Values cell, I can't find a better way using a "previous year data" column.

     

    Regards,

    Simon Hou