Forum Discussion

calliandutra's avatar
calliandutra
Frequent Visitor
9 years ago

Calculate row in matrix

Hi,

 

I've a matrix table and i need put a row calculated between rows.

 

The Descriptions is in a table dimension, as below:

 

1 - Sales

2 - Spending

3 - Result

4 - Other Spending

6 - Imobbilized

7 - New Result

 

 

The records in my fact table are relationed with the codes 1, 2, 4 and 6. The row 3 and 7 i need calculate.

 

Look the picture attachment

1 Reply

  • v-huizhn-msft's avatar
    v-huizhn-msft
    Microsoft Employee

    Hi calliandutra,

    You can try to create the two measure using the following formula. 

    3calculate-Row=CALCULATE(SUM(Table[sale]),FILTER(Table,Table[DescricaoN1]="1-ReCEITAS OPERACIONAIS"))-CALCULATE(SUM(Table[sale]),FILTER(Table,Table[DescricaoN1]="2-GASTOS OPERACIONAIS TOTAL"))
    
    7calculate-Row=CALCULATE(SUM(Table[sale]),FILTER(Table,Table[DescricaoN1]="4-GASTOS NAO OPERACIONIS"))-CALCULATE(SUM(Table[sale]),FILTER(Table,Table[DescricaoN1]="6-Capital Social"))


    Then add the measure as value level and check if it works fine.

    If you have other issues, please feel free to ask.

    Best Regards,
    Angelia