Forum Discussion

Saloni's avatar
Saloni
Helper I
9 years ago
Solved

How to filter area charts

I want to create an area chart for monthly data of 3 years. I have a list of 10 companies. How can I filter the companies I want to see on the chart? X-axis contains months and Y-axix contains the values.

 

Appreciate your help!

  • Phil_Seamark's avatar
    Phil_Seamark
    9 years ago

    A quick way to achive this is to use the Unpivot feature in the Query Editor.

     

    So before :

     

     

    After :

     

5 Replies

  • Phil_Seamark's avatar
    Phil_Seamark
    Microsoft Employee

    Hi Saloni

     

    If you drag the column that contains the company name to the visual (perhaps the Legend box) you will see all your companies, but you will also be able to filter from there as well.

    • Saloni's avatar
      Saloni
      Helper I

       

      Data looks something like this. How can I apply a filter to the companies I want to see in the area chart?

      • Phil_Seamark's avatar
        Phil_Seamark
        Microsoft Employee

        I'd suggest pivoting your data so it's more in this format

         

        Date        , Company , Value
        2/29/12   , A              , 1
        2/29/12   , B              , 1.1
        2/29/12   , C              , 1.2
        2/29/12   , D              , 1.1
        2/29/12   , E              , 1.1
        2/30/12   , A              , 2
        
        etc...
    • Saloni's avatar
      Saloni
      Helper I

      The list of companies is not a single column. 10 columns contain 10 different companies! How can I apply a filter to them?