Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

Info

NOTE: The IF function is interchangeable with ternary operators. You should use this function instead of ternary construction.

D s

D s
snippetBasic

Example:

D code

derive type:single value:IF(State == 'NY','New York, New York!','some other place') as:'isNewYork'

...

Info

NOTE: For a larger dataset, you might maintain your buy, sell, and hold evaluations for each stock in a separate reference dataset that you join to the source dataset before performing comparisons between column values. See Join PagePanel.

To assist in evaluation, you might first want to create columns that contain the cost (Basis) and the current value (CurrentValue) for each stock:

...