Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
acbg
Resolver III
Resolver III

Graph two columns on same axis

Have a scenario where we want to display two different columns on same bar graph:

 

One column has Sales Rep and the other column has Sales Manager.

 

We want to see on the same bar graph both Sales Rep and Sales Manager with the sales total.

 

Fact table which has sales total is joined to the dimension table (which has sales rep and sales manager) through sales rep ID.

 

Just doing a side by side comparison on the same graph


Capture.PNG

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Ok so let me clarify:

 

A Sales Rep has sales and manager.

A Sales Rep's sales are his sales only.

A Sales Manager is his sales plus the sales of any Sales Rep below him.  Is that correct?

 

If thats the case, you'd need to create a measure that does 2 sums and adds them together.  The first sum would simply be "Sales with my name on it" and the second would be "Sales where I'm the manager".

 

Now Sales Reps will always be 0 for that second one, so it should work fine.  Sales Managers who don't actually sell will be 0 for the first one.  Overall you should get the right number and you can then place this onto the same Axis.  The only thing you'll need is a list of Employees to act as your Axis.

 

View solution in original post

11 REPLIES 11
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @acbg,

 

Have you solved your problem?

 

If you have solved, please accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

 

If you still need help, please share some data sample so that I can copy and test.

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-piga-msft here is a sample data you could use

 

Fact table: 

Sales Rep ID       Sales Total

15000
22000
3500
4500

 

Dimension:

Sales Rep ID    Sales Rep Name     Sales Manager Name

1Sales Rep 1Sales Manager A
2Sales Rep 2Sales Manager A
3Sales Rep 3Sales Manager b
4Sales Rep 4Sales Manager B
Anonymous
Not applicable

You should be able to do this by using the "Clustered Bar Chart" and bring both columns/measures into the Values box of the visual's field settings.

Thanks for the reply @Anonymous

 

But when you bring the column into value box it changes to count instead of the actual category.

Anonymous
Not applicable

Put the Sales Rep name into the Legend Box.

Please see below, trying to compare both sales manager and sales rep in the same chart side by side.

 

Capture.PNG

Hi @acbg,

 

Based on your information, it seems that the sales total of Sales Manager A is 7500, it seems that is the sum of 5000+2000+500.

 

I'm a little confused about this result. I think the sales total of Sales Manager A should be Sales Rep 2+Sales Rep 1=7000.

 

Could you describe your logic in more details?

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

sorry graph was created early on and data was just something sample I put together. 

 

 

Anonymous
Not applicable

Ok so let me clarify:

 

A Sales Rep has sales and manager.

A Sales Rep's sales are his sales only.

A Sales Manager is his sales plus the sales of any Sales Rep below him.  Is that correct?

 

If thats the case, you'd need to create a measure that does 2 sums and adds them together.  The first sum would simply be "Sales with my name on it" and the second would be "Sales where I'm the manager".

 

Now Sales Reps will always be 0 for that second one, so it should work fine.  Sales Managers who don't actually sell will be 0 for the first one.  Overall you should get the right number and you can then place this onto the same Axis.  The only thing you'll need is a list of Employees to act as your Axis.

 

Thanks! That still does not show the sales manager and sales rep side my side.

 

If we have the sale maanger on axis and sales rep in the legend. It does not show sales manager total.

 

The only way I can see a decent outcome is to put both sales manager and sales rep in the axis column and have the user drill down.

Anonymous
Not applicable

I must not be completely understanding what you are achieving I think.  Can you do a quick MS Paint mock up of what you are hoping to see?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors