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

Join two tables with different number of rows and columns to one bar graph

I have two tables. One is "Sales" the other is sales "Goal". So sales have the "sale ID" which I want to count to show a monthly count of sales bar chart with a line showing the goal for that month. I also need to drill down to the month and show the sales per day in the month along with the line representing the goal divided by the days of that month. My problem is the data does not have the same columns. How would I fix this? Please and thank you.

Goal.PNGGoal

 

sales.PNGSales

 

2 REPLIES 2
Anonymous
Not applicable

Re: Join two tables with different number of rows and columns to one bar graph

Hi @Jbmolina93,

 

We need to first create common columns in the 2 tables to join them.

 

For Table 1 Create a Month_Year column:

 

Month_Year = 'Goal'[Date] & ", " & 'Goal'[Year]

 

For table 2:

 

Month_Year = FORMAT('Sales'[Date], "MMM, YYYY")

 

Then join these columns and you should be good to go.

Jbmolina93 Frequent Visitor
Frequent Visitor

Re: Join two tables with different number of rows and columns to one bar graph

I get an error when I try and join.

"The column with the name of 'Date' already exists in the 'Table' Table."

error.PNG

Helpful resources

Announcements
Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

Virtual Launch Event

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Users Online
Currently online: 129 members 1,688 guests
Please welcome our newest community members: