Forum Discussion

pankajdeol's avatar
pankajdeol
Frequent Visitor
9 years ago
Solved

Line and stacked column chart

Hello Friends, I am new to Power BI and got stuck in my first assignment. Please help. 

I have two tables, in one I have a date column (mm/dd/yyyy hh:mm:ss) and one "Order ID" column. In 2nd table I have one date column(same format), one "Order ID" column and one "Order Type" column. Both tables are for different companies and order id is in diff format. I want to show a combine chart containing a line which shows monthly count of orders from table one and stacked columns showing count of order ID by order type from 2nd table. 

  • Hi pankajdeol,

     

    According to your description above, you should be able to follow steps below to create the line and stacked column chart.:smileyhappy:

     

    1. Create an individual Calendar table using formula below.

     

    Date = CALENDARAUTO()

     

    2. Create relationships between the Calendar table and both the two tables with Date columns.

     

     

    3. Use date column from the Calendar table as Shared axis for the chart.

    Regards

  • pankajdeol's avatar
    pankajdeol
    9 years ago

    Thanks v-ljerr. This works great. I have one more doubt if you can help pls. When I am using date as shared axis either it takes month or year. How to display year and Month both and how to sort that as in excel.

4 Replies

  • v-ljerr-msft's avatar
    v-ljerr-msft
    Microsoft Employee

    Hi pankajdeol,

     

    According to your description above, you should be able to follow steps below to create the line and stacked column chart.:smileyhappy:

     

    1. Create an individual Calendar table using formula below.

     

    Date = CALENDARAUTO()

     

    2. Create relationships between the Calendar table and both the two tables with Date columns.

     

     

    3. Use date column from the Calendar table as Shared axis for the chart.

    Regards

    • pankajdeol's avatar
      pankajdeol
      Frequent Visitor

      Thanks v-ljerr. This works great. I have one more doubt if you can help pls. When I am using date as shared axis either it takes month or year. How to display year and Month both and how to sort that as in excel.

      • v-ljerr-msft's avatar
        v-ljerr-msft
        Microsoft Employee

        Hi pankajdeol,

         

        Just two steps.:smileyhappy:

        1. Keep only Year and Month for the Date Hierarchy as shared axis.

        2. Click "Expand all down one level in the hierarchy" on the left top of the chart.

         

        Regards