Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
calliandutra
Frequent Visitor

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

 

PowerBI.png

 

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 1
v-huizhn-msft
Employee
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

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.