Forum Discussion

Jayfemi's avatar
Jayfemi
Helper I
9 years ago
Solved

Percentage Data Labels for Line and Stacked Column Chart

Hi i have got a Line and Stacked Column Chart and when i select data labels i am given the sum for each segment in the chart. Ideally instead of the sum i would like the percentage of that segment to only be visible over the Sum.

 

is this possible or can this be added as a tooltip instead?

 

 

  • Hi Jayfemi,

    If my understanding is right, you can create several measures using the formulas.

    NewCompleted = SUM(Data[Completed])/SUM(Data[Allocated])
    NewFollow = SUM(Data[FollowOn])/SUM(Data[Allocated])
    NewNoAccess = SUM(Data[NoAccess])/SUM(Data[Allocated])
    NewNoAction = SUM(Data[NoAction])/SUM(Data[Allocated])


    Add the measures as value levels, you will get the following result, please review and download the pbix file.



    Best Regards,
    Angelia

8 Replies

  • v-huizhn-msft's avatar
    v-huizhn-msft
    Microsoft Employee

    Hi Jayfemi,

    Please create a measure using the formula below, and add the measure as value level.

    Percentage=sum(Table[value])/CALCULATE(SUM(Table[value]),ALL(Table))


    If this still does not resolve your issue, please share your sample table and list expected result.

    Best Regards,
    Angelia

    • Jayfemi's avatar
      Jayfemi
      Helper I

      Hi Angela,

       

      I hope this finds you well, thank you very much for your time i really appreciate it. The fomula does solve one of my problems it is now but getting it to show up on the visual.

       

      i used the formula as like this treating the Allocated as the total so on the visual instead of seeing the sum of completed jobs i'd like to see that as a percentage of the allocated jobs.

       

      CJP Percentage = sum(Data[Completed])/CALCULATE(SUM(Data[Allocated]),ALl(Data))

    • degnek's avatar
      degnek
      Frequent Visitor

      This solution for me is parsing the percentage across the entire chart instead of breaking based on x-axis categories. Is this the intention and/or is it possible to get it to break down by the x-axis categories? For instance in my chart I break it down by group, and am needing to look at what percentage each group has for stories that are completed vs not. 

      Example of data:
      Table <Monthly Totals>


      <Month><Area><Category><NumValue>
      Jan JK  Stories Completed 8

      Jan JK  Not on Time 2

      Jan JR  Stories Completed 6

      Jan JR  Not on Time 1

      Feb JK  Stories Completed 30

      Feb JK  Not on Time 1

      Feb  JR  Stories Completed 15

      Feb JR  Not on Time 1