Custom Column for Pivot
Hello all,
I am trying to create a custom column with the following conditions:
IF
( (SUM([Sale Price])<361000, [Sale Price ]/1.2, SUM([Sale Price ])),
(SUM([Sale Price])<450000, [Sale Price ]+21350/1.3, SUM([Sale Price ])),
(SUM([Sale Price])>450001, [Sale Price ]/1.5, SUM([Sale Price ])))
However, I am getting "syntax error: unexpected token "IF"
Any w=help would be appreciated. Thank you.
Hi,
Are you adding a column in the elasticube ? If so, indeed the IF does not exist alone, and need to be typed. So you will need in your case to use one of this function from this page : Logical Functions (sisense.com)
You can also use CAS / WHEN, like in this page Adding a Custom Column (sisense.com) :
CASE
WHEN [PriceVsCompetitor%] < -0.05 THEN '-5%'
WHEN [PriceVsCompetitor%] >= -0.05 AND [PriceVsAvgCompetitor%] <= 0.05 THEN '-5%/+5%'
WHEN [PriceVsCompetitor%] > 0.05 THEN '+5%'
end
Let me know if this works for you.
Best, David.