Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Need help on matrix table

Hi.  Pls advise the question in my sample file in this link:

https://www.dropbox.com/s/v1zv1hycllbeqco/test.pbix?dl=0 

  • Hi Anonymous ,

     

    Based on my research, add columns in Matrix is not accessible.  But we can take a try in the table following below steps:

     

    1. I can’t use your sheet in query editor, so I copied your data in the new table1. And grouped the version in query editor:

    2. Sorted ascending and added the index column:

    3. Then applied the change, we’ll get the table1 , add the 3 measures to get the results:

    Compare NS by version = CALCULATE(SUM(Table1[NS]),Table1[Version]="Actual")-CALCULATE(MAX(Table1[NS]),VALUES(Table1[Version]))
    Compare GM by version = CALCULATE(SUM(Table1[GM]),Table1[Version]="Actual")-CALCULATE(MAX(Table1[GM]),VALUES(Table1[Version]))
    Compare IFO by version = CALCULATE(SUM(Table1[IFO]),Table1[Version]="Actual")-CALCULATE(MAX(Table1[IFO]),VALUES(Table1[Version]))

    Best regards,

    Dina Ye

1 Reply

  • v-diye-msft's avatar
    v-diye-msft
    Community Support

    Hi Anonymous ,

     

    Based on my research, add columns in Matrix is not accessible.  But we can take a try in the table following below steps:

     

    1. I can’t use your sheet in query editor, so I copied your data in the new table1. And grouped the version in query editor:

    2. Sorted ascending and added the index column:

    3. Then applied the change, we’ll get the table1 , add the 3 measures to get the results:

    Compare NS by version = CALCULATE(SUM(Table1[NS]),Table1[Version]="Actual")-CALCULATE(MAX(Table1[NS]),VALUES(Table1[Version]))
    Compare GM by version = CALCULATE(SUM(Table1[GM]),Table1[Version]="Actual")-CALCULATE(MAX(Table1[GM]),VALUES(Table1[Version]))
    Compare IFO by version = CALCULATE(SUM(Table1[IFO]),Table1[Version]="Actual")-CALCULATE(MAX(Table1[IFO]),VALUES(Table1[Version]))

    Best regards,

    Dina Ye