title: SAPUI5 chart measures name based on variable
body: <p>I have a chart that compares one year's values to another years'. What I would like to do is to use variables in the definition of the measures so that the legend shows the years' numbers (from the variables). I tried assigning the variables to the 'name' configuration of the chart but I get an error when I do this. Currently, I have it showing 'Start Year' and 'End Year' but would really like it to be the actual year numbers the user is comparing.  </p>
  
  <p>This is the portion of my controller that defines the measures and feeds:</p>
  
  <pre><code>I have two variables that start as the current year and the previous year, but the user can modify those values.
      var startYear = today.getFullYear();
      var endYear = today.getFullYear()-1;
  
  var oDataset = new FlattenedDataset({
      dimensions: [{
          name: "KPI",
          value: "{field}"
          }],
      measures: [{
        name: "Start Year",   &lt;- I tried putting startYear here and below but get errors
        value: "{current}"
      },{
        name: "End Year",       &lt;- tried putting endYear here and below but got errors
        value: "{previous}"
      }],
      data: {
            path: "/bullet",
            filters: [oFilter]
          }
      });
  
      oVizFrame.setDataset(oDataset);
      oVizFrame.setModel(oModel);
  
      oVizFrame.setVizProperties({
          plotArea: {
              dataLabel: {
                  visible: true,
                  formatString: '#,##0'
              },
              colorPalette: ['sapUiChartPaletteSemanticNeutral'],
              gap: {
                  visible: true
              }
          },
          valueAxis: {
              title: {
                  visible: false,
  
              }
          },
          legend: {
              title: {
                  visible: false
              }
          },
          title: {
              visible: true,
              text: 'Year Comparison'
          }
      });
    var feedValueAxis = new FeedItem({
        'uid': "valueAxis",
        'type': "Measure",
        'values': ["Start Year"]    &lt;- tried putting startYear here but didn't work
      }),
      feedCategoryAxis = new FeedItem({
        'uid': "categoryAxis",
        'type': "Dimension",
        'values': ["KPI"]
      }),
      feedTargetValues = new FeedItem({
        'uid': "targetValues",
        'type': "Measure",
        'values': ["End Year"]       &lt;- tried putting endYear here but got error
      });
  </code></pre>
  
  <p>Can someone please help?</p>