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

Clustered Stacked Chart with Subcounts on one table

I have a single table that I want to graph on a clustered stacked chart.  The table looks something like the following:

Owners          Location           SuperGroup     OtherGroup

Joe                 Atlanta                     Y

Joe                 Atlanta                                             Y

Joe                 Atlanta

Joe                 New York                 Y

Joe                 Pittsburgh

Mary              Kansas City               Y

Mary              Kansas City

Mary              Denver                      Y

 

I would like to have Owners on the X axis.  Each Location would be a column within each owner.  The column stack would represent the total amount of records for a giving Owner/Location combo, while the a portion of that stack would represent a count of all records for a given Owner/Location combo where either SuperGroup OR OtherGroup = Y.

 

I have been playing around with measures with distinct but can't figure it out.

 

Thanks in advance.

-Scott_J

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Clustered Stacked Chart with Subcounts on one table

Hey,

 

first I would create a calculated column like so

 

Either SuperGroup or OtherGroup = 
IF(OR('Table1'[SuperGroup] = "Y", 'Table1'[OtherGroup] = "Y"),1,0)

then a measure like so

 

Sum of Either SuperGroup or OtherGroup = 
SUM('Table1'[Either SuperGroup or OtherGroup]) 

this leads to chart like this

image.png

 

Hopefully this is what you are looking for

 

Regards

Tom

 

 

Hamburg - Germany
If I answer your question, please mark my post as solution, this will also help others.
Proud to be a Datanaut!

View solution in original post

2 REPLIES 2
Super User
Super User

Re: Clustered Stacked Chart with Subcounts on one table

Hey,

 

first I would create a calculated column like so

 

Either SuperGroup or OtherGroup = 
IF(OR('Table1'[SuperGroup] = "Y", 'Table1'[OtherGroup] = "Y"),1,0)

then a measure like so

 

Sum of Either SuperGroup or OtherGroup = 
SUM('Table1'[Either SuperGroup or OtherGroup]) 

this leads to chart like this

image.png

 

Hopefully this is what you are looking for

 

Regards

Tom

 

 

Hamburg - Germany
If I answer your question, please mark my post as solution, this will also help others.
Proud to be a Datanaut!

View solution in original post

Super User
Super User

Re: Clustered Stacked Chart with Subcounts on one table

Hi,

 

I'd suggest you select the first 2 columns and "Unpivot the other columns" to convert your dataset into a 4 column one (the third and fouth columns being Groups and Response) using the Query Editor.  Then create your chart.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 86 members 1,325 guests
Please welcome our newest community members: