community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx Designer Knowledge Base

Definitive answers from Designer experts.

Create a Multi-Line Map Label

Moderator
Moderator
Created on

 

Multi-Line labels can be useful when you want to display multiple data points. Instead of using one long concatenated string, you can tell Alteryx to create a new line once it encounters a specific character specified by the user. To create a multi-line label simply follow these steps:

 

  1. Use a Formula tool to concatenate the fields that you want to display while also adding a wrap character in between each value. In this example, we are using the backward slash as the wrap character.

    Formula1.png

  2. In the Report Map tool in the 'Data' tab, select the new field you created in Step 1 for the 'Label Field'.



    reportmap1.jpg


  3. In the 'Layers' tab, check the 'Wrap Character' box and specify the wrap character used in the previous step.


    reportmap2.jpg

  4. The results should look something like this:

    Map.png

 

 

 

Things to Consider:

  • Make sure that the character you use as the wrap character is not present in any of the data that you are including in the label. Otherwise, you will get more lines than you bargained for, along with the possibility for some strange data. There is a section of the attached workflow that performs this check.
  • Though this would be complete overkill, I tested a 50 line label and it worked. In other words, there doesn't seem to be a practical limit to the number of lines you can create for your label. 

 

Please see the attached completed workflow.

 

Thanks for reading!

Attachments
Comments
ACE Emeritus
ACE Emeritus

Great tip.

 

If only we could choose how to orient the label text (left, center, right justified)...some of my multi-row labels look awkward when they're always aligned left.

Moderator
Moderator

Thanks, Amanda. Please feel free to suggest that and any other ideas in our Ideas center: http://community.alteryx.com/t5/Alteryx-Product-Ideas/idb-p/product-ideas

 

Thanks again!

 

Dan

Meteoroid

Is this better than just making a pre-wrapped label within the Formula box, where instead of the (+ ' /' +) you would just add a carriage return?

Moderator
Moderator

Hi @rnorthup - Thanks for your question. Does that work for you?