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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
ktt777
Helper V
Helper V

SORTING, DISPLAY CLUSTERED BAR CHART

Hi, 

i have below clustered bar chart. I have few questions: 

1.How can i sort it based on Total of blue + red value ? Right now i can only sort either blue or red value

2. How can i show percentage of blue over total for each bar? example 1st bar : 100%....

3. How can the graph only show the top bar that contribute up to 80% of total value ? 

 

ktt777_0-1616941557817.png

thanks, 

1 ACCEPTED SOLUTION

@ktt777 

please see the attachment below.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

3 REPLIES 3
ryan_mayu
Super User
Super User

@ktt777 

since you don't provide the sample data , I created some simple data.

1.PNG

1. did you create a measure to calculate the value? what's your measure? it should sort by total by default

1.PNG

2.you can create a measure

perc = sum('Table (3)'[amount])/CALCULATE(SUM('Table (3)'[amount]),ALLEXCEPT('Table (3)','Table (3)'[product]))

 

2.PNG

or add that measure to tooltips

5.png

3. I think the workaround is to create a new table

new table = 
var tbl=ADDCOLUMNS(SUMMARIZE('Table (3)','Table (3)'[product],'Table (3)'[type],"amount",sum('Table (3)'[amount])),"percentage",[amount]/CALCULATE(sum('Table (3)'[amount]),ALLEXCEPT('Table (3)','Table (3)'[product])))
return FILTER(tbl,[percentage]>=0.8&&'Table (3)'[type]="1" || [percentage]<0.2 && 'Table (3)'[type]="2")

6.PNG

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




thank you a lot. 

 

Link to example file : https://1drv.ms/x/s!ApIDnMK2eKiFgRkOMv8RFE4QmD25?e=xcTQa9

Page 1:  How  to sort by total. Example 2019, Apple should be above Orange

             How to create tooltip to show : Orange, Asia 40, 62% ( percentage of Asia in Orange type only)

PAge 2: How to create tooltip to show : China, Qty 74, 55.6 % ( percentage of China over 2019 total)

 

thanks 

 

 

@ktt777 

please see the attachment below.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.