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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Madeleine
Frequent Visitor

Add/Assign row in matrix a calculation

I'm trying to create a P/L Matrix in Power BI with a specifik defined naming and sort order, I have to different issues I have problem finding a solution for.

 

1. Calculate Margin and add it to a existing row-header. (Sales - Cost)Ex. 

HeaderAmount
Sales10 000
Cost5 000
Margin Sales(Want add calculation and assign it to this row...)

 

2. Sum Amount based on a higher level of hierachy, and add it to my matrix.

The end result I want is as following, and in the model I have 3 tables;

End Result:

HeaderAmount
Sales10 000
Other Sales2 000
Total Sales(I want to base this on the total sum on another hierarchy level based in the Account table)

 

 

ReportHeader Table:

To define the final result of naming and sort order. 

 

HeaderSort
Sales1
Other Sales2
Margin Sales3
Total Sales4

 

Account Table:

Stores the raw account information and hierarchy level

 

LEVEL1LEVEL2AccountKey
Total SalesSales5111
Total SalesOther Sales5112

 

Ledger Table:

Stores the amount

 

AccountKEYAmount
Sales10 000
Other Sales2 000
2 REPLIES 2
v-stephen-msft
Community Support
Community Support

Hi @Madeleine ,

 

Sorry.

How did you get the 5000 listed in your cost?

Why is one of your two Account keys a number and the other a text?

Please provide me with more details about your table and your problem

9.png

 

 

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.