Forum Discussion

Minakshi's avatar
Minakshi
Resolver I
6 years ago
Solved

stacked chart

 

Hello All,

I want to plot stack charts as shown in figure. I have 4 columns having values 0 and 1. I want to stack count of zeros on count of ones. Kindly help.

Thanks

  • Hi Minakshi ,

     

    Consider the following Input Data:

     

    Go to Query Editor, Select both the columns and Unpivot columns under Transform tab:

     

    You will end up with the following:

     

    Close and Apply changes and try creating a chart as follows:

     

    Thanks,

    Pragati

     

12 Replies

    • Minakshi's avatar
      Minakshi
      Resolver I

      Fowmy Pragati11 Is there any other way to do it? I don't want to unpivot data as I have more visuals to make with the same data. 

      • Fowmy's avatar
        Fowmy
        Super User

        Minakshi 

         

        The advantage of having your data unpivoted in this way will support you in almost any visuals as it's normalized.  better stick to that. 

        If you really need it your way, then create a reference query in power query  and unpivot. You can use for this visual as well as others when necessary 

         

        ________________________

        Did I answer your question? Mark this post as a solution, this will help others!.

        I accept KUDOS 🙂

        YouTube, LinkedIn

  • Minakshi 

    Please share some sample data in the layout that is supposed to be used for the chart you desire.

    ________________________

    Did I answer your question? Mark this post as a solution, this will help others!.

    I accept KUDOS 🙂

    YouTube, LinkedIn

    • Minakshi's avatar
      Minakshi
      Resolver I

      Fowmy , Pragati11  data is just like this

      OSAPlanolocationfacing 
      0101
      1101
      0111
      1011

       

      I want to show no of zeros and no of one stacked on each other for each colum.

       

      Thanks

      • Pragati11's avatar
        Pragati11
        Super User

        Hi Minakshi ,

         

        Consider the following Input Data:

         

        Go to Query Editor, Select both the columns and Unpivot columns under Transform tab:

         

        You will end up with the following:

         

        Close and Apply changes and try creating a chart as follows:

         

        Thanks,

        Pragati