Forum Discussion
Horizontal Bar Chart with Text Labels on the Right
Hello,
I am trying to add text labels at the end of horizontal bars in a bar chart. I know this can be done in excel but I'm not seeing any apparent way to do it in Power Bi. The text labels need to dynamically reflect values inputted into the spreadsheet. So if a value is changed from 'Not Paid' to 'Paid' that will need to update in the chart upon refresh. Below is a mock up of what I am looking for.
Any help is appreciated here.
Hi Anonymous ,
By my test, can't achieve it directly in the bar chart.
I create four measures and put them in a card chart besides each bar.
Pay Invoice1 = MAXX(FILTER(ALL('Table'),'Table'[Invoice]="Invoice1"),'Table'[Pay])Pay Invoice2 = MAXX(FILTER(ALL('Table'),'Table'[Invoice]="Invoice2"),'Table'[Pay])Pay Invoice3 = MAXX(FILTER(ALL('Table'),'Table'[Invoice]="Invoice3"),'Table'[Pay])Pay Invoice4 = MAXX(FILTER(ALL('Table'),'Table'[Invoice]="Invoice4"),'Table'[Pay])You can also group the five visuals, they can move around without changing the structure.
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyjIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
9 Replies
- Pragati11
Super User
Hi Anonymous ,
If you can share a complete screenshot with what fields you have moved in the bar chart visual, that will help.
In my case, I have got following information on my chart:
And when I enable Data Labels, I see them on the right as shown below:
Mre information will be really helpful.
- AnonymousNot applicable
Hi Pragati11 ,
Below is a look at the fields for the visual.
I already have everything I need as far as numeric values. What I need at the right side of the bars is values from another column to show dynamically.
Hope this helps, thanks
- Pragati11
Super User
Hi Anonymous ,
I don't think you can achieve that on a horizontal bar chart.
But I can suggest using Small Multiples if that helps like below:
- AnonymousNot applicable
I added measures that pull the value for each invoice and displayed them as cards.
Now my issue is when a new invoice is added to the spreadsheet, it won't add a new card or reformat the spacing of the existing cards as the charts change shape.
- v-yanjiang-msft
Community Support
Hi Anonymous ,
By my test, can't achieve it directly in the bar chart.
I create four measures and put them in a card chart besides each bar.
Pay Invoice1 = MAXX(FILTER(ALL('Table'),'Table'[Invoice]="Invoice1"),'Table'[Pay])Pay Invoice2 = MAXX(FILTER(ALL('Table'),'Table'[Invoice]="Invoice2"),'Table'[Pay])Pay Invoice3 = MAXX(FILTER(ALL('Table'),'Table'[Invoice]="Invoice3"),'Table'[Pay])Pay Invoice4 = MAXX(FILTER(ALL('Table'),'Table'[Invoice]="Invoice4"),'Table'[Pay])You can also group the five visuals, they can move around without changing the structure.
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyjIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- AnonymousNot applicable
v-yanjiang-msft this is a great work around thank you. The only problem is that if new invoices are added to the tracker, new labels will not populate automatically. I'm hoping Microsoft will add the feature of additional labels to meet this requirement as it will be immensely useful.
- v-yanjiang-msft
Community Support
Hi Anonymous ,
It's my pleasure! You can submit an idea in Power BI ideas Forum to improve Power BI and make this feature coming sooner.
Best Regards,
Community Support Team _ kalyj
- radhey_rec
Resolver II
Hi Anonymous ,
If you are open to custom visuals, you can achieve this with https://pbivizedit.com
You can download the cutom visual file and check from here: https://pbivizedit.com/gallery/2352415
I used the following data:
Phase Id Invoice Id Paid Status Value Dummy Phase 1 Invoice 1 Paid 48 0 Phase 2 Invoice 1 Paid 4 0 Phase 1 Invoice 2 Not Paid 50 0 Phase 2 Invoice 2 Not Paid 19 0 Phase 1 Invoice 3 Not Paid 47 0 Phase 2 Invoice 3 Not Paid 6 0 Phase 1 Invoice 4 Paid 10 0 Phase 2 Invoice 4 Paid 0 0
Dummy can be a measure which always returns zero.
And then I was able to achieve this:
Thanks,
Radhey