none
How to reference a dynamic column name when adding a column? RRS feed

  • Question

  • I have parameter table in excel that I use to build the dataset. Below is example of the values that were entered, but they could change based on whatever the end user enters.  So for instance, Year1 could be 2007 and Year2 could 2001.  Anyways the columns are named based on the years that are entered as parameters.  If I go add a Custom column, I need to reference the columns and so I can select [2019] and [2018] from the list but when the years change this doesn't work any longer.  How do I call the two column names without knowing their names.  The columns will always be in the same position if that matters.

    Year1 - 2019

    Year2 - 2018

    Friday, September 27, 2019 2:22 PM

Answers

  • To reference a particular column by position rather than by name, try adding a custom column and entering the following formula:

    = Record.FieldValues(_){1}

    Where 1 is the index of the column you want to access.

    Ehren

    Friday, September 27, 2019 8:30 PM
    Owner