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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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