Forum Discussion

ChrisPBI's avatar
ChrisPBI
Icon for Advocate III rankAdvocate III
10 years ago
Solved

Matrix Table Value Changes of Consecutive Years

Hello,   what I try to implement is a Matrix Table with value differences for consecutive years.   Example:               The first row, and the first column mirror each other. In t...
  • v-ljerr-msft's avatar
    10 years ago

    ChrisPBI


    what I try to implement is a Matrix Table with value differences for consecutive years.

    Is that possible?

     


    Yes, it is possible to do that.

     

    First create a table with the Year information and the corresponding Value, here I create a table called 'TestTable'

    Second, create a duplicate table of 'TestTable'(with different column names), called 'TestTable2', with column Year2 and Value2.

    Then use CROSSJOIN to create another table 'TestTable3'.

    TestTable3 = CROSSJOIN(TestTable,TestTable2)

    Use the following formula to create a custom column [Difference] for 'TestTable3'.

    Difference = TestTable3[Value2]-TestTable3[Value]

    Last, use 'TestTable3' to create the Matrix Table.

     

    Note: the values in matrix can only accept numeric values so that we can’t replace 0 with dash “-”.