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

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. 

 

felixthecat_nyc_0-1644944559621.png

 

Any help is appreciated here. 

 

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

Hi @felixthecat_nyc ,

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.

vkalyjmsft_0-1645508929841.png

I attach my sample below for reference.

 

Best Regards,
Community Support Team _ kalyj

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

9 REPLIES 9
radhey_rec
Resolver II
Resolver II

Hi @felixthecat_nyc ,

 

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 IdInvoice IdPaid StatusValueDummy
Phase 1Invoice 1Paid480
Phase 2Invoice 1Paid40
Phase 1Invoice 2Not Paid500
Phase 2Invoice 2Not Paid190
Phase 1Invoice 3Not Paid470
Phase 2Invoice 3Not Paid60
Phase 1Invoice 4Paid100
Phase 2Invoice 4Paid0

0

 

Dummy can be a measure which always returns zero.

And then I was able to achieve this:

radhey_rec_0-1645514423390.png

 

Thanks,
Radhey

v-yanjiang-msft
Community Support
Community Support

Hi @felixthecat_nyc ,

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.

vkalyjmsft_0-1645508929841.png

I attach my sample below for reference.

 

Best Regards,
Community Support Team _ kalyj

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

@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. 

Hi @felixthecat_nyc ,

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

Hi @Pragati11 , 

 

Below is a look at the fields for the visual. 

felixthecat_nyc_0-1644948917623.png

 

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

Hi @felixthecat_nyc ,

 

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:

Pragati11_0-1644958769351.png

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

I added measures that pull the value for each invoice and displayed them as cards. 

felixthecat_nyc_0-1644962186189.png

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.

 

Hi @felixthecat_nyc ,

 

Yes it won't. You can't make that dynamic in your scenario.

I would suggest adding a new table visual with Invoices and Paid status. This will atleast change dynamically.

Also, your cards won't add/decrease based on the number of bars you have on the bar chart.

 

You can may be try adding this field as a Tooltip, but not very sure if it will fulfil the purpose.

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Pragati11
Super User
Super User

Hi @felixthecat_nyc ,

 

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:

Pragati11_1-1644947630609.png

And when I enable Data Labels, I see them on the right as shown below:

 

Pragati11_0-1644947607889.png

Mre information will be really helpful.

 

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

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.