Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Data prep for first stacked bar chart

jeffv
8 - Asteroid

All,

 

I did some searching but can't seem to figure out how to format data for a simple stacked bar chart.

 

Say for example I have the following data:

 

Area, Smiles, Frowns

1, 22, 56

2, 29, 2

3, 10, 0

4, 10, 70

 

For all my trying various combinations I can't seem to figure out how to produce a stacked bar chart.  Not sure what is considered the series.  What I'm search for on horizontal axis is the areas.  The stacked bars consist of # smiles, and # of frowns.  Seemed so simple when I started ... sigh.  Any guidance appreciated.

 

Jeff

12 REPLIES 12
robheb
5 - Atom

Series refer to the elements of the chart. In the case of your example Stacked Bar chart, it sounds like you'll want two series, one for smiles and one for frowns.

 

I am not sure if you are looking for a Stacked Bar, or Stacked Column based on your description. If you want the "Area" on the bottom axis and the stacked bars extending vertically, that would likely be a "Stacked Column".

 

Are either of these helpful?

image.png

image.png

jeffv
8 - Asteroid

@robheb

 

You are right I used the incorrect terms.  If I could get either to work it'd be a miracle.  You proven it can be done.

 

Can you look at mine?  I only get three columns but can't see a place to change that.  Also can see how I get the labels right.  I'm sure it's something simple.

BTW, my data might be different.

 

Thanks for guidance!

 

Jeff

jeffv
8 - Asteroid

Hmmm,

 

So I've fought with all the options and I think I got it to show the all the areas on horizontal axis and a stacked column.  Man that's difficult.  Seems like there ought to be a example, tutorial, or some documentation.  Painful... far too painful.

 

One thing I couldn't figure out,  are the horizontal labels angle adjustable?  Couldn't find anything that seemed to be related.

 

Thanks,

Jeff

 

robheb
5 - Atom

I opened the file that you sent and it looks like you had checked "Area" in "Fields to Group" (See the screenshot below). I unchecked the box and got all of the Areas on the horizontal axis. It was a little confusing to me, but checking that box was creating one chart per Area instead of one chart with all the Areas combined. Hopefully that is the fix that you found in your second comment.

 

Reporting has always been very difficult for me. I feel that it is not really Alteryx's strongest attribute when you want to focus heavily on formatting so I tend to default to Tableau or Excel if I have very specific needs. However, there are some webcasts related to the Reporting tools in the Live Training section of this Community site. Here is an introductory training but you might be able to find something more suitable for what you are trying to do if you dig a little deeper than I did:

 

https://community.alteryx.com/t5/Live-Training/Live-Training-Introduction-to-Reporting/td-p/66495

 

 

Finally, as far as I know, there is no way to change the test angle for the axis labels. It might be something to propose in the Ideas section.

 

image.png

jeffv
8 - Asteroid

@robheb,

 

Thanks...  boy I wish I would have seen that presentation before I fought with trying it on my own.

 

Thanks for all you help I'm think I'm moving forward now!

Jeff

Amy18
8 - Asteroid

Hi Robheb,

 

Can I ask you several questions about Alteryx Stacked Bar chart? 

  • Is there any way that I could put the number label to the center of my stacked bar?

Capture.PNG

  • Is there any way to remove or change the "record" and Layout" header? 

2.PNG

  • For the color of bars, I know I could pick different color palette under "Legend, Data Layout". But can I choose the color for each bar (field)? 

3.PNG

 

Thanks.

CailinS
Alteryx
Alteryx

@Amy18 I attached an example workflow using the Charting tool to do the things you suggest. Once you add the series to your stacked bar chart, you will see additional options on the left menu which allows you to add labels, change colors, etc for each piece of the bar.

2018-11-01_15-18-31.jpg

 

Regarding your question about changing the default names of the fields, or snippets, of the report, you can always use a Select tool to change field names, but I think what you may really want is to feed your report piece into a Layout tool and/or a Render tool (like my example). The headers that you show will not show up in an actual, Rendered, report. Or I may not totally understand what you're trying to do or what your end goal is. Hope this helps!

Cailin Swingle
Customer Experience
Amy18
8 - Asteroid

Hi Cailin,

 

Thank you for your reply. But it does not solve my questions. 

 

In my analysis, I just would like to see one stacked bar, as below. I don't want to add several series. 

 

Capture.PNG

 

I saw you have "1", "2" "3" under Setup Chart Appearance. How did you create them? Can you tell me? 

 

For my second questions about the position of label, you saw on my chart that "21%" is posted on the blue part which is not right. Label "21%" should belong to the red part while label "76%" belongs to the blue part. And I can not see the label for the green part. Do you know how to put each label to the center of each color bar? (label 21% to the middle of red part,  label 76% to the middle of blue part). 

 

Thank you so much! 

CailinS
Alteryx
Alteryx

@Amy18, apologies for any confusion caused by my example. I have 3 locations and that is why i have three bars. The 'series' represents the 'stacks' and if you'll specify them like I did in my example workflow, you will see the '1,2,3' show up in your options on the left - this may require you to rearrange your data (using a CrossTab, Transpose, and/or combination of the two - hopefully my example workflow helps to show how to structure the data for purposes of the stacking. Regarding the labels, once you open my example workflow you can see the options available, but I'm not sure you'll be able to place them as specifically as you describe.

Cailin Swingle
Customer Experience
Labels