cancel
Showing results for
Did you mean:
New Member

## Compare Two Values Side by Side in Bar Chart

Hi,

I have two tables like below.

Table 1 (Target Sales):

Year       Target Sales Points

1          1000

2           800

3           800

4           700

5           700

Table 2 (Actual Sales):

Sales Person ID    Year    Actual Sales Points

1                         1       800

1                         2      300

2                         1       1050

2                         2       850

2                         3       800

.

.

.

Now I need to compare Actual Sales against Target Sales for the selected Sales Person in a column / bar chart.

I added Year from table 1 on axis and Target Sales on values for a column / bar chart. When I add the Actual Sales Point from table 2, it is getting summed up(For example, for rep 1, it is summed up as 1100) and showing the same value for all 5 years.

I want to show the actual for each year against target sales points and in case if the actual does not exist for any of the 5 years, it should show blank. Please guide me to achieve this.

1 ACCEPTED SOLUTION

Accepted Solutions
Super User IV

## Re: Compare Two Values Side by Side in Bar Chart

You need a common axis, so either you are missing a relationship between your Year columns or you need to create a separate Year table and relate it to both of your tables. Then use that common Year for your axis.

---------------------------------------

Not the Power BI thought police...

##### I have NEW book! DAX Cookbook from Packt
Over 120 DAX Recipes!

Proud to be a Datanaut!

2 REPLIES 2
Super User IV

## Re: Compare Two Values Side by Side in Bar Chart

You need a common axis, so either you are missing a relationship between your Year columns or you need to create a separate Year table and relate it to both of your tables. Then use that common Year for your axis.

---------------------------------------

Not the Power BI thought police...

##### I have NEW book! DAX Cookbook from Packt
Over 120 DAX Recipes!

Proud to be a Datanaut!

Highlighted
Microsoft

## Re: Compare Two Values Side by Side in Bar Chart

Hi @berryjohn,

Have you tried the solution provided by @Greg_Deckler above? Does it work in your scenario? If it works, could you accept it as solution to close this thread?

If you still have any question on this issue, feel free to post here.

Regards

Announcements

#### New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

#### ‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

#### Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

#### Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

#### Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors