How to create new column and assign data from dataset?

Hi All,

How to create new column and assign data from dataset ?
i would like to create new column name as Marketing Channel.

if
column irefer is not null assign value to column Marketing Channel = iRefer
else
assign value to column Marketing Channel = value from campaign_channel column

Thanks for your help.
Siriphon

Hi @Siriphon

Could you try this:

  1. On the edit data screen, from the top left click on Add Calculated Field
  2. On the new screen, i.e., the editor, give the column name as Marketing Channel
  3. Enter the formula below making any edits you want to make:
     ifelse(isNotNull({irefer}), "iRefer", toString({campaign_channel}))
    

Helpful references:

  1. Ifelse - Amazon QuickSight
  2. isNotNull - Amazon QuickSight
  3. Adding calculated fields - Amazon QuickSight

Please mark this as a solution if this works, or let us know if you face issues. Thanks.

2 Likes

it working many thanks !!!

2 Likes

Thanks for letting us know @Siriphon! Thanks for sharing the solution @SD_QS!

1 Like