Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Add text to bar graph values

Hi All,

I am looking through the custom visual page and not finding what i'm looking for so far - thought i'd ask the group - is there a custom visual bar chart that will allow you to add text to the value and display it in the chart?  For example, the Advanced Card visual allows you to run a basic card but they have an option for you to add a text to the value so you could say have a card that said 45,213Widgets, or 1.2x, etc.  you type in Widgets or x into the option box and it appears next to the value.  I'd like the same ability in a bar chart so my value would show up as 1.2x to use my previous example, and not just 1.2  If I try to add it onto the value in a measure it turns it into a string which then doesn't work in a bar chart so just curious if anyone knows of a custom visual that has this ability.

 

Thanks,

YB

  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi v-lionel-msft ,

     

    Thanks for the reply - I found out it actually can - thanks to another users suggestion to something similar in another thread - you can change your value in modelling to a custom field.  You could create a duplicate measure if you don't want the value spread accross every instance and add what you want onto the end of the custom - then it will show up in graphs, tables, etc. 

7 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi amitchandak  - thanks for your response....

       

      Here is what i'm looking for it to show:

       

       

      Before someone suggests - the x does NOT represent any monetary value, etc. lol.  I have the values 3.5 and 1.8 and i'd like them to show in my bar chart as 3.5x.  I can't do it in regular charts now.  There is no way to add anything onto the values.  As I said, the custom visual Advanced Card lets you add it onto a card value - so if this was a card it would show in the regular pbi card as 3.5 but with the advanced card it gives me the option to add the x so it would be 3.5x.  Looking to see if there is a bar chart in the custom visuals that would allow me to do the same thing - add a text value onto the regular value I selected. 

      • parry2k's avatar
        parry2k
        Super User

        Anonymous Seems like you are looking for a custom data label which is unfortunately not possible. If you convert your measure to text then you will not able to use it in the visual, only way or the best way to approach this is to add custom tooltip page and you can show anything there. 

  • v-lionel-msft's avatar
    v-lionel-msft
    Community Support

    Hi Anonymous ,

     

    In the current version( 2.79.5768.663 64-bit (March 2020) ), this idea cannot be realized, because the value label of the bar chart can only fill the numeric field, but what you want to display is the text field.

     

    Best regards,
    Lionel Chen

    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

      Hi v-lionel-msft ,

       

      Thanks for the reply - I found out it actually can - thanks to another users suggestion to something similar in another thread - you can change your value in modelling to a custom field.  You could create a duplicate measure if you don't want the value spread accross every instance and add what you want onto the end of the custom - then it will show up in graphs, tables, etc. 

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi 

         

        How you managed to do this. Can you share th pbix.

         

        Appreciate your help.

         

        Cheers

         

        CheenuSing