Forum Discussion

nkp's avatar
nkp
Copper Contributor
Jan 08, 2026

How to create a multi-tiered percentage-based bar chart?

Hello,

I would like to create a multi-tiered percentage-based bar chart based on the data found below (test data evidently). Column B and C add up to 100%, Column D and E add up to 100%, and lastly column F and G add up to 100%. I would like each set of variables to equate to 100% on the graph, as the source data is percentage based anyways, but all be organized in their own separate row on the graph underneath the employee name. I have included a diagram drawn in MS paint to portray the desired output (with an accompanying legend). Thanks in advance!

Employee NameNumber of Sales Made %Number of Sales Made from Other Competitors %Number of Calls Made %Number of Calls Made from Other Competitors %Number of Individual Employees % (always is 1)Number of competitor employees %
John28.57%71.43%30.00%70.00%16.67%83.33%
Stacy41.67%58.33%38.71%61.29%20.00%80.00%
Richard47.06%52.94%47.06%52.94%14.29%85.71%
Andy42.31%57.69%40.48%59.52%10.00%90.00%

 

6 Replies

  • The essential characteristic of the replies you have received is that the data needs to be unpivoted in order to plot it.  This can be done using PowerQuery or by formula.

    = LET(
        wrapped, WRAPROWS(TOCOL(data),2)/100,
        name,    TAKE(WRAPROWS(TOCOL(IF(data, Tabelle1[Employee])),2),,1),
        hdr,     TAKE(WRAPROWS(TOCOL(IF(data, header)),2),,1),
        HSTACK(name, hdr, wrapped)
      )

    If you include the attribute names in the chart data then the presentation can be labelled more meaningfully.

     

     

  • IlirU's avatar
    IlirU
    Iron Contributor

    Hi,

    In cell I2 I have applied this formula:

    =HSTACK(TEXTSPLIT(TEXTJOIN("",, REPT(A2:A5 & ",", COLUMNS(B2:G5) / 2)),, ",", TRUE), WRAPROWS(TOCOL(B2:G5), 2))

    I then selected cells I2:K13 and in the Insert Chart window I chose Bar (see the screenshot above).

     

    Hope this helps.

    IlirU

  • Lorenzo's avatar
    Lorenzo
    Silver Contributor

    Hi

    A 365 dynamic option. With your data formatted as table named Table1 in the below formula:

    =LET(
      data,         Table1,
      colsCount,    COLUMNS( data ),
      fieldsCount,  colsCount -1,
      names,        TOCOL( IF( SEQUENCE(, fieldsCount/2), CHOOSECOLS(data, 1) ) ),
      values,       WRAPROWS( TOCOL( CHOOSECOLS(data, SEQUENCE(fieldsCount,,2) ) ), 2 ),
      VSTACK(
        {"Employee name", "value 1", "value 2"},
        HSTACK( names, values )
      )
    )

     

    • nkp's avatar
      nkp
      Copper Contributor

      This works, thank you for your efforts!

Resources