utilizing CALCULATE and ALL to calculate value per sqft

vbaisdaxing

New Member
Joined
Aug 23, 2017
Messages
12
tblProperty
[TABLE="width: 500"]
<tbody>[TR]
[TD]id[/TD]
[TD]property type[/TD]
[TD]sqft[/TD]
[TD]property value[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]apartment[/TD]
[TD]100[/TD]
[TD]10000[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]industrial[/TD]
[TD]100[/TD]
[TD]5000[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]office[/TD]
[TD]100[/TD]
[TD]4000[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]apartment[/TD]
[TD]300[/TD]
[TD]5000[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]industrial[/TD]
[TD]200[/TD]
[TD]6000[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]office[/TD]
[TD]100[/TD]
[TD]70000[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]apartment[/TD]
[TD]100[/TD]
[TD]80000[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]industrial[/TD]
[TD]100[/TD]
[TD]9000[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]office[/TD]
[TD]100[/TD]
[TD]10000[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]apartment[/TD]
[TD]200[/TD]
[TD]11000[/TD]
[/TR]
</tbody>[/TABLE]

PivotTable
[TABLE="width: 500"]
<tbody>[TR]
[TD]row labels[/TD]
[TD]sum of sqft[/TD]
[TD]sum of property value[/TD]
[TD]value/per sqft[/TD]
[/TR]
[TR]
[TD]apartment[/TD]
[TD]700[/TD]
[TD]106000[/TD]
[TD]151.43[/TD]
[/TR]
[TR]
[TD]industrial[/TD]
[TD]400[/TD]
[TD]2000[/TD]
[TD]50[/TD]
[/TR]
[TR]
[TD]office[/TD]
[TD]300[/TD]
[TD]84000[/TD]
[TD]280[/TD]
[/TR]
</tbody>[/TABLE]









Hello everyone,

I have a table called tblProperty. I am trying to create/utilize a DAX formula that can help me calculate the value/per sqft. I'm assuming some combination of using CALCULATE and ALL is probably the right direction in attaining my desired results. Any suggestions will be greatly appreciated. Thanks in advance!!!
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Create three measures:

Code:
Sum of sqft:=sum([sqft])
Sum of pv:=SUM([property value])
pv/sqft:=[Sum of pv]/[Sum of sqft]

and in Pivot table add in

Rows: property type
Σ Values: Sum of sqft, Sum of pv, pv/sqft
 
Upvote 0
Also, whenever you are dealing with division you should use the DIVIDE() function to protect yourself from #DIV/0! errors.
 
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,252
Members
452,623
Latest member
Techenthusiast

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top