Search code examples
powerbidaxdaxstudio

how to create a new column with adding fixed value to another column cell value


I have a table looks like this

enter image description here

I have to create a new column C, with 1st value is the same as column B and next value should add a fix value 20 to each cell, how can I do this?

Output should look like this:

enter image description here

It will be a great help if someone can help me with this, thanks


Solution

  • You can just make it by saying:

    C = ( [A] - 1 ) * 20 + 100
    

    Alternative if you have a different value in [B] you can use the LOOKUPVALUE function and it'd look like this:

    C = ( [A] - 1 ) * 20 + LOOKUPVALUE( Table[B], [B], MAX( [B] ) )