Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Question

I would like to calculate a field according to a value of another field in the Datamart but am unable to do so. What is the correct expression?

I tried:

update
Code Block
IF(ColumnNumber=1,GrossSales,"")
CASE ColumnNumber WHEN 1 THEN GrossSales END
Page Properties
hiddentrue
Author
Contributors
limit1
showLastTimetrue
reversetrue
order

Answer

The correct way is to use IF:

Code Block
IF(ColumnNumber="1", GrossSales, 0)
  • ColumnNumber is text, so use "".

  • GrossSales is money, so you can't use "", instead use 0.