Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

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 _ kalyj

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

9 Replies

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

     

  • Anonymous's avatar
    Anonymous
    Not 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's avatar
      Pragati11
      Icon for Super User rankSuper 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:

      • Anonymous's avatar
        Anonymous
        Not 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.

         

  • 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 _ kalyj

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

    • Anonymous's avatar
      Anonymous
      Not 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's avatar
        v-yanjiang-msft
        Icon for Community Support rankCommunity 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

  • 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 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:

     

    Thanks,
    Radhey