Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Make new column basedexisting column values

Hello,   I want to make a new column with the values based of a existing column. At the moment I have the following columns:  1. 'TypeWorkTime' with two values: planning and realtime 2. 'Time'  ...
  • d_gosbell's avatar
    7 years ago

    I'm not really sure what you are trying to do here. If you want to create a new calculated column that only returns the time if the type is "planning" then you would write it like this

     

    Planning = IF( 'Trello cards'[TypeWorkTime] = "Planning" ; 'Trello cards'[Time] )

    However, if the point of this column is just to ba able to sum up the planning time then you don't need a new column you can do all that in a measure.

     

    eg.

     

    Planning = CALCULATE( SUM(  'Trello cards'[Time] ) ; 'Trello cards'[TypeWorkTime] = "Planning" )