title: How can I easily label my data in Power BI?
body: <h1>Question</h1>
  
  <p>Is there a fast, scalable way to replace number values by mapped text labels in my visualisations?</p>
  
  <h1>Background</h1>
  
  <p>I often find myself with questionnaire data of the following format:</p>
  
  <pre><code>ID    Sex    Age class    Answer to question
  001    1     2            5
  002    2     3            2
  003    1     3            1
  004    2     5            1
  </code></pre>
  
  <p>The <code>Sex</code>, <code>Age class</code> and <code>Answer</code> column values actually map to text labels. For the example of <code>Sex</code>:</p>
  
  <pre><code>ID    Description
  0     Unknown
  1     Man
  2     Woman
  </code></pre>
  
  <p>Similar mappings are possible for the other columns.</p>
  
  <p>If I create visualisations of e.g. the distribution of sex in my respondent group I'll get a visual showing that 50% of my data has sex <code>1</code> and 50% of my data has sex <code>2</code>.</p>
  
  <p>The data itself often originates from an Excel or csv file.</p>
  
  <h1>What I have tried</h1>
  
  <p>To make that visualisation meaningful to other people I:</p>
  
  <ul>
  <li>create a second table containing the mapping between the value and label</li>
  <li>create a relationship between the source data and the mapping</li>
  <li>use the <code>Description</code> column of my mapping table as a category in my visualisations.</li>
  </ul>
  
  <p>I have to do this for several columns in my dataset, which makes this a tedious process.</p>
  
  <h1>Ideal solution</h1>
  
  <p>A method that allows me to define, per column, a mapping between values and corresponding text labels. <a href="http://www.statsmakemecry.com/smmctheblog/using-syntax-to-assign-variable-labels-and-value-labels-in-s.html" rel="nofollow noreferrer">SPSS' <code>VALUE LABELS</code> command comes to mind</a>.</p>