Forum Discussion

DanielFlores's avatar
DanielFlores
Regular Visitor
10 months ago
Solved

How to create a chart with separate values but in the same chart

Hi

I would like to create a chart to represent diferent values but in seperate lines. I have theses categories DL15, DL25 DL45, DL75 and D110, each category will have differents values for each item.  I would like to represent them in the same chart, Please see the attached as references. In the example below you have a sets of values (DL15, DL25 DL45, DL75 and D110) for three differents items.

How can I transform (order) my data to get this kind of chart?

 

Thanks for your support

14 Replies

  • Hello DanielFlores ,

     

    To display separate lines for each category (DL15, DL25, DL45, DL75, D110), your data should be in a long format. Here's an example:

     

    | Item | Category | Value |

    |--------|----------|-------|

    | Item A | DL15 | 10 |

    | Item A | DL25 | 15 |

    | Item A | DL45 | 20 |

    | Item A | DL75 | 25 |

     

    1. Import your data

    2. If your data is in wide format (each category as a column), use Power Query to transform it:

       - Select the columns DL15 to D110.

       - Click Transform > Unpivot Columns.

       - This will give you a table with Item, Category, and Value.

    3. Create a Line Chart:

       - X-axis: Item

       - Y-axis: Value

       - Legend: Category

     

    Have a nice day,

     

    Vivien 

    • DanielFlores's avatar
      DanielFlores
      Regular Visitor

      Thanks vivien57 for your support.

      I did it, but I still can't get the correct chart I want. There is a way to have all the values dL15,d25,d45,d75,d110 in the line fo each item? 

      • vivien57's avatar
        vivien57
        Super User

        Hello DanielFlores ,

        you must pivot so that DL15, DL25... becomes a category and not a column name

        Have a nice day,

        Vivien

      • MasonMA's avatar
        MasonMA
        Super User

        Hi, you may consider first normalizing your data and turning them into rows with a category and value. 

        In Power Query, unpivot column as in picture. 

         

        After tidying your data, in reporting use 'Attribute' for small Multiples to display categories side by side. 

         

  • v-tejrama's avatar
    v-tejrama
    Community Support

    Hi  DanielFlores ,

     

    Thank you vivien57   for the response provided! 

     

    Has your issue been resolved? If the response provided by the community member addressed your query, could you please confirm? It helps us ensure that the solutions provided are effective and beneficial for everyone.

     

    Thank you for your understanding!

     

    • DanielFlores's avatar
      DanielFlores
      Regular Visitor

      Hi v-tejrama 

       

      I would like to say thank for all the support. the issue was solve.

      Thanks again

      • v-tejrama's avatar
        v-tejrama
        Community Support

        Hi  DanielFlores ,

         

        It would be helpful if you could share the workaround you used to resolve the issue, as it could benefit other community members who encounter a similar problem.

         

        Thank you,

        Tejaswi.