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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
AFS
New Member

Create a graph comparing values of two sliced subgroups

Hello.

 

Sorry for the bad title. Let me explain the problem with an example.

 

I have two different pages with data on an Excel file. Let's call them P1 and P2:

 

 

Hoja1.pngHoja2.png

 

 

 

 

 

 

 

 

 

 

I want to create a graph that compares the values of a group from P1 and a group from P2 with the help of slicers. Here's what I got.

 

 

 

pantalla.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

At the top there's a slicer to select a Group (I, II or III) from both P1 and P2 each. In the image, group II is selected for P1 and group I is selected for P2.

 

In the middle there are two graphs from P1 and P2 respectively, showing the values of each name (A, B and C) from the group selected in each splicer. Both of these are correct, and I want to combine them in a single graph.

 

At the bottom you can see my attempt at the combined graph (selected). The values from P1 are showed correctly but the values from P2 are wrong, showing the total instead of each value.

 

This is probably a simple problem but I can't seem to figure it out. I'm trying to find a solution that doesn't require editing the Excel file, but if that's not possible then it doesn't matter.

 

Thanks in advance.

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

Create a Names table like:

 

Name

A

B

C

 

Make the obvious relationships to P1 and P2 tables. Use Names[Name] as your Axis.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

Create a Names table like:

 

Name

A

B

C

 

Make the obvious relationships to P1 and P2 tables. Use Names[Name] as your Axis.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Worked like a charm.

 

Cheers!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.