Forum Discussion

lotus22's avatar
lotus22
Helper III
2 years ago
Solved

Overlay % bar chart inside the Total Bar Chart

Any help is appreciated

Attached is the sample data and may not match the chart below

Column B and C are in Millions

Basically the four bars in X axis are for each Supplier by Year....for example, call first one Supplier A
 
1. Supplier has four bars for years 2020, 2021, 2022, 2023 and total is the number of parts they delivered in millions
2. The percent is basically the total number of parts delivered that were bad / total parts (total bad parts/total parts)
3. The growth rate is from the Minimum year (in this case 2020) to the maximum year (2024) - showing a number of increases in volume with this supplier.
4. colors are for each Year, and also light colors are for the bad parts.

 

 

SupplierQTYGood/BADYear
Supplier D932023
Supplier B222023
Supplier B302021
Supplier C1392023
Supplier D432023
Supplier D1102021
Supplier C18142023
Supplier D19112022
Supplier A1352021
Supplier D1042022
Supplier A112022
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi lotus22 ,

    After my testing, it doesn't seem to be possible to insert an additional percentage bar graph. Changing the value returned by the measure to a percentage could indirectly accomplish your goal.

    The Table data is shown below:

    I use the following measures to calculate the percentage of bad parts.

     

    Total = SUM('Table'[Good]) + SUM('Table'[Bad])
    _% = 
    VAR _a = SUM('Table'[Bad])
    VAR _b = DIVIDE(_a,[Total],0)
    RETURN _b

     

    However, since it is a stacked column chart, the corresponding area is too small due to the value being a percentage, thus not displaying the data labels.

    1.Changing visual objects

    2.Use the card visual object to override the corresponding value(This approach is cumbersome and requires the creation of multiple card visual objects)

     

     

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi lotus22 ,

    Regarding your question, are you planning to implement a similar effect in Power BI Desktop?

    Perhaps you could try 'stacked column chart'.

    Set the color here.

    Correct me if I'm misunderstanding.

    • lotus22's avatar
      lotus22
      Helper III

      Thank you for your reply Anonymous 

       

      I need to show the good/bad as percentage instead of a number.

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi lotus22 ,

        After my testing, it doesn't seem to be possible to insert an additional percentage bar graph. Changing the value returned by the measure to a percentage could indirectly accomplish your goal.

        The Table data is shown below:

        I use the following measures to calculate the percentage of bad parts.

         

        Total = SUM('Table'[Good]) + SUM('Table'[Bad])
        _% = 
        VAR _a = SUM('Table'[Bad])
        VAR _b = DIVIDE(_a,[Total],0)
        RETURN _b

         

        However, since it is a stacked column chart, the corresponding area is too small due to the value being a percentage, thus not displaying the data labels.

        1.Changing visual objects

        2.Use the card visual object to override the corresponding value(This approach is cumbersome and requires the creation of multiple card visual objects)