Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Tenzin
Contributor
Contributor

If statement to get "-" sign in front of (aggr( formula

Hi All,

I have a formula which starts with -(aggr( and I want to make the "-" sign in front of the (aggr( a variable. So I have tried the following formula $(v_NegativeOrPositive)(aggr(, but this doesn't work as the variable itself already returns an "Error in Expression". If I use a variable with just a "-" sign without an if statement then this works in the formula, so I guess that this should also be possible with an if statement.

v_NegativeOrPositive:
if(NegativePositive='Negative',-,)  <- returns Error in expression

Does anyone have a good solution to solve this?

Thanks in advance!

Labels (1)
0 Replies