title: How to add a user-input value to each row in a column in PowerBI
body: <p>I'm new to PowerBI, so please forgive, if this is a very simple question.</p>
  <p>I have a dataframe that holds information on patients, a timestamp for a visit at a hospital dept, which type of visit and if the amount of time between their first visit and last visit meet a certain criteria for the amount of time between the two. I created an index to be able to calculate the # of days betweeen each row's visit and the visit in the previous row. The duration is calculated based on the sum of days between visits for each single patient and the OF4-criteria is checking if the duration is above or below a certain threshold.
  It looks something like this:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>ID</th>
  <th>Timestamp</th>
  <th>Event</th>
  <th>Index</th>
  <th>Days_since_last_visit</th>
  <th>Duration</th>
  <th>OF4-criteria</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>01257</td>
  <td>11-10-2021</td>
  <td>CT-scan</td>
  <td>0</td>
  <td>0</td>
  <td>79</td>
  <td>Not met</td>
  </tr>
  <tr>
  <td>01257</td>
  <td>02-11-2021</td>
  <td>PET-scan</td>
  <td>1</td>
  <td>22</td>
  <td>79</td>
  <td>Not met</td>
  </tr>
  <tr>
  <td>01257</td>
  <td>29-12-2021</td>
  <td>F-code</td>
  <td>3</td>
  <td>47</td>
  <td>79</td>
  <td>Not met</td>
  </tr>
  <tr>
  <td>5789</td>
  <td>24-11-2021</td>
  <td>CT-scan</td>
  <td>4</td>
  <td>0</td>
  <td>29</td>
  <td>Met</td>
  </tr>
  <tr>
  <td>5789</td>
  <td>7-12-2021</td>
  <td>ECG</td>
  <td>5</td>
  <td>13</td>
  <td>29</td>
  <td>Met</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>and so on...</p>
  <p>My goal is to be able to create a slider, so that I can play around with the # of days between visits and investigate, what happens with the ratio of patients that meet og don't  meet the OF4-criteria.
  I created a &quot;what-if&quot; parameter for the user to input an amount of days, that I want to subtract from the variable duration, but I can't use the input to calculate a new column, since it is a measure and only can be used in other measures.
  Ideally what I want is to be able to create a new column named &quot;what-if-duration&quot;, that is calculated with the original column &quot;duration&quot; and has the number of days subtracted.</p>
  <p>Does anyone know a way to do this?</p>