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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
738o51
Helper II
Helper II

Make measure the axis on a column chart

Hi everyone,

 

I am working on a report to show the range of occupany in a given time period. This occupancy can be divided in a few ways: there are two campuses (Main and North) and two categories of occupancy (A and B, where A is a medical/surgical hospital bed and B is an intensive care hospital bed).

 

I want to build a histogram that shows the distribution of occupancy and that is responsive to my filters on A and B. I've successfully built an occupancy measure that does this, but I cannot make a measure the axis value on a column graph. 

 

I also created a calculated column for occupancy. Unfortunately, though, using this as an axis doesn't give me accurate results.

For example, my Main campus has A and B census and occupancy.

Let's assume the following:

On a given day, there are 6 patients on a 12 room A-type unit and  6 patients on a 8 bed B-type unit.

Occupancy A = 50% and Occupancy B = 75%. Combined Occupancy = 60%.

If I can use the measure, I'll get the correct occupancy for the main campus of 60%. Using the column occupancy, I end up getting two occupancies, 50% and 75%.

 

Can anyone help me?

 

Pbix - https://www.dropbox.com/s/cd8m8o5xw7b1n6s/histogram%20pbix%20for%20forum.pbix?dl=0 

3 REPLIES 3
HotChilli
Super User
Super User

Hi,

Is the correct pbix attached?

 

There's no campus column and there are 3 Types (A,B,C) and there is no calculated column.

Apologies if i've misunderstood.

Apologies! Here is the correct file: https://www.dropbox.com/s/cd8m8o5xw7b1n6s/histogram%20pbix%20for%20forum.pbix?dl=0 

 

Thanks for pointing that out!

I think you want to follow the dynamic segmenation pattern

https://www.daxpatterns.com/dynamic-segmentation/ 

 

You create a table with your buckets (rangename, min, max)

You write a measure that incorporates your existing measure Occupancy Measure and filters using the bucket sizes from the new table.

You can then put the rangename on the x-axis of the chart and pull the new measure into the values section.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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