The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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.
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.
Solved! Go to Solution.
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 )
Best Regards
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 )
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
User | Count |
---|---|
15 | |
8 | |
6 | |
6 | |
5 |
User | Count |
---|---|
23 | |
13 | |
13 | |
8 | |
8 |