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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
austin2359
Regular Visitor

Stacked Bar Chart with Multiple Bars for each percentile Fee

1) So we want a slicer where we can select a code.   The code is a string based field.

 

2) Then we want for each code, to show 20 bars representing intervals of 5 percent for the associated fees for each code.  0-5. 5-10. 10-15, 15-20. etc.

 

Is it possible to do this using a measure instead of calculated columns?  The person I am working with feels it's very possible but undesireable to use calculated columns vs measures.

 

Understanding all this, could you run us through how to configure this chart and configure the measure?

1 ACCEPTED SOLUTION
v-yohua-msft
Community Support
Community Support

Hi, @austin2359 

You want to split the value of the selected code field into 20 parts, for example I have a code called AB, and it has a value of 100, and when I select it in the slicer, stacked Bar chart will show 20 bars. The measure is a result and cannot be placed on the x-axis of this graph. But you can go and try all of them with Measure, and if you succeed, you can share it with us.

The following is my idea, we can create a interval table named Table2.

vyohuamsft_0-1705372535293.png

 

Create a new column in the Code table to determine which interval it is in according to the cost value. For example, this fee is 84%, then it is in the range of 80-85, associate this column with this interval column in Table2, and then you can judge =SWITCH(TRUE(),percentage<5,"0-5",percentage>5&&,percentage<=10,"5-10").

If you want to implement it, can you provide some sample data.

 

 

How to Get Your Question Answered Quickly 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

Best Regards

Yongkang Hua

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yohua-msft
Community Support
Community Support

Hi, @austin2359 

You want to split the value of the selected code field into 20 parts, for example I have a code called AB, and it has a value of 100, and when I select it in the slicer, stacked Bar chart will show 20 bars. The measure is a result and cannot be placed on the x-axis of this graph. But you can go and try all of them with Measure, and if you succeed, you can share it with us.

The following is my idea, we can create a interval table named Table2.

vyohuamsft_0-1705372535293.png

 

Create a new column in the Code table to determine which interval it is in according to the cost value. For example, this fee is 84%, then it is in the range of 80-85, associate this column with this interval column in Table2, and then you can judge =SWITCH(TRUE(),percentage<5,"0-5",percentage>5&&,percentage<=10,"5-10").

If you want to implement it, can you provide some sample data.

 

 

How to Get Your Question Answered Quickly 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

Best Regards

Yongkang Hua

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Ritaf1983
Super User
Super User

Hi @austin2359 

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.