Forum Discussion

MatthewMcL's avatar
MatthewMcL
Frequent Visitor
7 years ago

Changing Dimensions from axis to line.

Hello,

 

I am building a report based on a few store performances over a years time. Currently I have a line chart below.

 

Where I am running into trouble is switching store and the months. I would like the stores to be the line dimension while the months be the x-axis.

 

When I try to just move the column store, it only offers count or unique count. I imagine this is because of how my table is set up.

 

Below is generally what my table looks like.

 

It was very straight forward to do the flip in Excel. I would like my report to look like the following.

 

Thank you in advance for any help you can offer.

2 Replies

  • HotChilli's avatar
    HotChilli
    Icon for Community Champion rankCommunity Champion

    If you look at your data, the columns are the month, what you really want is to get the month into the data (and not being a header).

     

    You need to unpivot the month columns.  Edit the query.  Select all the month columns and choose 'Unpivot columns' from the Transform section.

     

    The table will then look a bit more like a 'fact' table with grain of  'StoreName', 'Month','Value'  (or similar depending on what you name your columns)

     

    Save the query and create your line chart

    • MatthewMcL's avatar
      MatthewMcL
      Frequent Visitor

      Oh, I should have mentioned that this particular table is created using DAX so using query editor to unpivot it isn't possible, unless there is some method of referencing a DAX table in Query Editor that I do not know about.