Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

nazaninslp
New Contributor III

if statement in text object properties

Dears

I want to show usage amount in text object and it contains if statement too, but when I run below ode , it just show a plain dash(-) like below :

IF(PRICE='0',NUM(sum(USAGE_VOICE_H)/sum(VOICE),'#.0%'))

1.JPG

I read lots of samples about this issue and changed my query to below one, but now the amount is wrong, it should be 7.3%.

would you please help me?

=sum(IF(PRICE='0',num((USAGE_VOICE_H)/(VOICE)),'#.0%'))

2.JPG

1 Solution

Accepted Solutions

Re: if statement in text object properties

Try this

Num(Sum({<PRICE = {'0'}>} USAGE_VOICE_H)/Sum({<PRICE = {'0'}>}VOICE), '#.0%')

View solution in original post

2 Replies

Re: if statement in text object properties

Try this

Num(Sum({<PRICE = {'0'}>} USAGE_VOICE_H)/Sum({<PRICE = {'0'}>}VOICE), '#.0%')

View solution in original post

nazaninslp
New Contributor III

Re: if statement in text object properties

Thank you soooooooooo much

it is working fine now !