Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

expression not working

Hi Guru's,

I have Natural Acount field and for each account i have Period net Balance in my finance P&L App.

sample data

Natural account       Period Net

1                                 200

2                               -100

3                               100

4                                 -300

5                                200

6                                  300

7                                  400

8                                     500

9                                      600

i want to write expression like below

if(wildmatch(num#([ACCT$QV$NATURAL_ACCOUNT]),'1*','5*','6*','7*','8*','9*'),

sum(PERIOD_NET)*1,

if(wildmatch(Num#([ACCT$QV$NATURAL_ACCOUNT]),'2*','3*','4*') and sum(PERIOD_NET)>0

, sum(PERIOD_NET)*-1))

issue here is seconf condition, if period net value for Account is already Minus - no need to multiply with -1 .

if it is positive value then only we need to multiply

ex:

Natural Account 3 =-1*100

for 2,4 ---no need to multiply

Thanks,

Raj

1 Reply
olivierrobin
Specialist III
Specialist III

hello

you can use sign() function to determine if the value is <0, =0,>0