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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
lilySixteen
Helper III
Helper III

rate calculation formula

Hello,

 

I have a tenant table to show tenant data for every shopping center. Every shopping center has a # of units that can be rented to tenants. In the "tenant name" column it contains value "Vacant" if the unit is not rented to any tenant. The vacancy rate is calculated by taking the number of vacant units, multiplying that number by 100, and dividing that result by the total number of units. My question is what's the formula to calculate it in Power BI? 

Thanks so much!

 

Lili

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@lilySixteen , Something like this 

divide(calculate(countrows(Table), filter(Table,Table[tenant name]="Vacant")),countrows(Table))

 

No need multiple by 100, Mark as % column

Data Format New Rib.png

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

4 REPLIES 4
nvprasad
Solution Sage
Solution Sage

Hi,

 

Try below formula

 

Vacancyrate =
DIVIDE (
CALCULATE ( COUNTROWS ( tablename ), tablename[tenant name] = "Vacant" ) * 100,
COUNTROWS ( ALL ( tablename ) ),
0
)

 

Thank You,

Venkata Nalla

Did I answer your question? Mark my post as a solution! Appreciate your Kudos.
Follow me on LinkedIn.

@nvprasad Thank you for helping me. Your answer is correct when calculating the total but not when calculate by shopping center. Thanks again for providing your answer!

amitchandak
Super User
Super User

@lilySixteen , Something like this 

divide(calculate(countrows(Table), filter(Table,Table[tenant name]="Vacant")),countrows(Table))

 

No need multiple by 100, Mark as % column

Data Format New Rib.png

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak Thanks so much! It worked.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 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.