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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

How to calculate value per m2 for total lines in a matrix?

Dear community,

 

I seeking for your support for the following:

 

How could I calculate Budget sales per m2 for total lines in a matrix? Attached you will find a PBIX file with an example. 

 

Link: https://www.dropbox.com/t/35tPIGgIgqOgCFya 

 

See for example total lines in red oval.

PowerBIFellow_0-1618381525463.png

Example: Gate 1A:

Budget sales €12.000,=

Area in m2: 600m2

Expected budget sales per m2 = 12.000 / 600 = 20 --> however it does show a value of 60

 

Column 'Budget sales per m2' in materix is a measure

 

Values per m2 for the individual weeks are calculated correctly.

 

Thanks in advance for your suggestions!

 

1 ACCEPTED SOLUTION
v-yalanwu-msft
Community Support
Community Support

Hi @Anonymous ,


According to your description, you could create two measures (Area and Budget2 ), the following formula to create :

Area = CALCULATE(MAX('Tbl_Data_2'[Area (in m2)]),ALLEXCEPT(Tbl_Data_2,'Tbl_Data_2'[Gate]))
Budget2 = SUM(Tbl_Data_2[Budget sales (in €)])/[Area]

The final output is shown below:

marix.jpg

 

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

View solution in original post

3 REPLIES 3
v-yalanwu-msft
Community Support
Community Support

Hi @Anonymous ,


According to your description, you could create two measures (Area and Budget2 ), the following formula to create :

Area = CALCULATE(MAX('Tbl_Data_2'[Area (in m2)]),ALLEXCEPT(Tbl_Data_2,'Tbl_Data_2'[Gate]))
Budget2 = SUM(Tbl_Data_2[Budget sales (in €)])/[Area]

The final output is shown below:

marix.jpg

 

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

Jihwan_Kim
Super User
Super User

Hi, @Anonymous 

I am not sure how to approach your data model, but please correct me if I wrongly approached it.

 

Please change the measure to the below.

 

Budget sales per m2 = SUM(Tbl_Data_2[Budget sales (in €)])/SUM(Tbl_Data_2[Area (in m2)])
or
Budget sales per m2 =  divide (SUM(Tbl_Data_2[Budget sales (in €)]) , SUM(Tbl_Data_2[Area (in m2)]))
 
I think the measure you have in your pbix file is not correctly written.
 
Thank you.
 

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

Linkedin: https://www.linkedin.com/in/jihwankim1975/


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
Anonymous
Not applicable

Thanks Jihwan Kim, you are right. I corrected. However, at the end I want to show the Budget sales per m2 for a single size of the respected gate sizes (in this example Gate 1A has a size of 100m2 and not making a sum. The situation should be like as follows:

 

PowerBIFellow_0-1618386080427.png

 

I also adapted the test database accordingly. 

 

Link: https://www.dropbox.com/t/LlwcGhcP9CY1VjTF

 

Thanks again!

 

 

https://www.dropbox.com/t/LlwcGhcP9CY1VjTF

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors