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

Show Percentage of Total area by function and project

I am working with areas of buildings.  I currently have visual that is displaying the Percentage of a Buildings Area by Room Function. My data is a list of Room Areas, the Building the room is in and the rooms function. Current visual looks like the below image.

Screenshot 2024-07-08 150407.png

 

I am using the below formula to calculate the area's pencentage of the whole.

 

Area % = Divide(CALCULATE(SUM('All Projects - Room Schedule'[Room SF])),CALCULATE(SUM('All Projects - Room Schedule'[Room SF]),ALLSELECTED('All Projects - Room Schedule'[Room Function])))

 

 

Currently I am showing all the room functions. I would like the visual to show only 1 function.  However when I set the filter to only show one function, the Area Percentage changes too.  Showing just one function also shows the percentage to be 100%  I understand that after filtering out the other functions, the one function will always be 100% of what is shown.  I would like the calculation to still consider the other functions as the the total area, but jsut show how one function compares across buildings.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @MichaelRensing ,

You can update the formula of measure [Area %] as below to get it, please find the details in the attachment.

 

Area % =
VAR _part =
    CALCULATE (
        SUM ( 'All Projects - Room Schedule'[Room SF] ),
        FILTER (
            'All Projects - Room Schedule',
            'All Projects - Room Schedule'[Room Function] = "STAFF SUPPORT"
        )
    )
VAR _all =
    CALCULATE (
        SUM ( 'All Projects - Room Schedule'[Room SF] ),
        ALLSELECTED ( 'All Projects - Room Schedule'[Room Function] )
    )
RETURN
    DIVIDE ( _part, _all )

 

vyiruanmsft_0-1720755298482.png

Best Regards

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @MichaelRensing ,

You can update the formula of measure [Area %] as below to get it, please find the details in the attachment.

 

Area % =
VAR _part =
    CALCULATE (
        SUM ( 'All Projects - Room Schedule'[Room SF] ),
        FILTER (
            'All Projects - Room Schedule',
            'All Projects - Room Schedule'[Room Function] = "STAFF SUPPORT"
        )
    )
VAR _all =
    CALCULATE (
        SUM ( 'All Projects - Room Schedule'[Room SF] ),
        ALLSELECTED ( 'All Projects - Room Schedule'[Room Function] )
    )
RETURN
    DIVIDE ( _part, _all )

 

vyiruanmsft_0-1720755298482.png

Best Regards

@foodd  Here is a link to the files.  Data Files

 

The outcome that I am looking for is filtering to show only 'Staff Support'. The building 'Centerville' should show a value of 6.80%, 'Finneytown' should show a value of 4.55%, and 'Winslow' should show a value of 2.22%

 

Thanks

 

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.