Alteryx Designer Desktop Knowledge Base

Definitive answers from Designer Desktop experts.

Alteryx for Excel Users: Create a bar chart in a column

WayneWooldridge
Alteryx Alumni (Retired)
Created

There's a nifty little trick in Excel using the =REPT function that creates an in-cell bar chart. Let's start with a simple set of numerical data:

Create Bar Chart in Column 01.png

Using the expression:

Create Bar Chart in Column 02.png

produces an in-cell chart that looks like this if you change the B2:B4 to a Wingdings font:

Create Bar Chart in Column 03.png

I divided the numerical data in A2:A4 by 5 to avoid getting a chart that was too big. Alternatively, we can use the expression:

Create Bar Chart in Column 04.png

And used an 8-pt Arial font to produce a bar chart without dividing Qty.

Create Bar Chart in Column 05.png

Neat-o! I wonder how I can do this using Alteryx.

To make a chart that looks like the one with the Wingdings font above, we'll have to refer to a unicode character table. We can't change the font to Wingdings, so we'll have to find the '■' character in the unicode character table. We have to scroll WAY DOWN to find it (it's Unicode number U+25A0).

Let's bring in our data using a Text Input Tool:

Untitled 08.png

and connect a Formula Tool followed by a Browse:

Untitled 07.png

Where the formula expression uses the function PADLEFT:

Create Bar Chart in Column 06.png

Our result looks like the one from Excel:

Untitled 09.png

Of course, we didn't have use a Unicode character. We could have used '|', similar the Excel example using the 8-pt Arial font.

Let's elaborate on this a bit. In our example, we would like to have a quick visual that stands out if [Qty] < 60. In the Formula tool expression, we'll use a conditional statement so a quantity less than 60 will appear as '▣' (U+25A3):

Untitled 10.png

Untitled 11.png

The results look like this:

Untitled 12.png

Let's take one final we could create a visual, one where the chart only has a single '■' positioned relatively. In other words, '■' for a quantity of 100 would appear further to the right than the row with a quantity of 55.

Untitled 13.png

Untitled 14.png

This gives a chart column that looks like this:

Untitled 15.png

Attachments
Comments
ozancanercan
6 - Meteoroid

How can i create a bar chart with a multi row&column excel data? 

 

Thank you.