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
SamerB
Frequent Visitor

How to plot multiple ratios on the same chart

 

Hi,

 

I am trying to plot on the same chart multiple ratios (metrics) without having an axis of categories.

For example, here I'd want to show the number of houses having multiple bathrooms out of the total number of houses, and below it a bar showing the number of houses having multiple floors out of the same total.

How would you go around doing that?

 

data.JPG

 

 

I can for example do this for one bar, where the Legend is the metric and the Value is the total data set. But this only works with one metric. I want to have a second bar right under it in that same chart.

 

Single bar, but I want to have multiple barsSingle bar, but I want to have multiple bars

I can also convert the true/false to 0/1 whole numbers, to be able to sum and plot them on a clustered bar chart, but this does not show the ratios explicitely. 

 

 

Clustered bars.JPG

 

Thanks.

3 REPLIES 3
v-yuezhe-msft
Employee
Employee

@SamerB,

Please check the measures in the PBIX file below.

https://1drv.ms/u/s!AhsotbnGu1Nokz-iFj6hTkQDHxGz

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks @v-yuezhe-msft for your time to recreate the example and the quick response.

 

What you send me is useful in terms of being able to plot True/False measures, instead of having to convert my values to 0/1 numbers as I was doing to be able to sum.

It still does not show ratios however (i.e. 2 houses out of 5), and plotting another bar for the total number of houses information isn't suitable.

I see it a very bothersome limitation for when the data doesn't have an axis or categories such as in my example.

 

Best,

Samer.

@SamerB,

I would recommend you unpivot columns in your table, then create a Matrix visual.
1.PNG2.PNG3.PNG

Or you can create a column chart as shown in the video below.
https://1drv.ms/v/s!AhsotbnGu1Nok0bIYnrjrgI3vSS6

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.