cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
pankajdeol
Frequent Visitor

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. 

2 ACCEPTED SOLUTIONS
v-ljerr-msft
Microsoft
Microsoft

Hi @pankajdeol,

 

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

 

1. Create an individual Calendar table using formula below.

 

Date = CALENDARAUTO()

t1.PNG

 

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

 

r1.PNG

 

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

result1.PNG

Regards

View solution in original post

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.

View solution in original post

4 REPLIES 4
v-ljerr-msft
Microsoft
Microsoft

Hi @pankajdeol,

 

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

 

1. Create an individual Calendar table using formula below.

 

Date = CALENDARAUTO()

t1.PNG

 

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

 

r1.PNG

 

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

result1.PNG

Regards

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.

Hi @pankajdeol,

 

Just two steps.Smiley Happy

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.

yearmonth.PNG

 

Regards

Thanks. you are my saviour 🙂

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors