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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
inam
Contributor III
Contributor III

Chart Expression

Hello Community,

I need help . in chart expression i am using below expression but not getting 0 value .

my expression:-  =sum([Room Nights])/sum(TOTAL([Room Nights])) i am getting all value proper but not getting  0 output 

my output:- 

inam_1-1686204828535.png

 

 

Expected output is :-

inam_2-1686204998086.png

Note:- i convert excel formula in Qlikview 

excel formula :- =[@[Room Nights]]/SUM([Room Nights]) so i used this formula in my qlikview chart expression

 =sum([Room Nights])/sum(TOTAL([Room Nights])) its working fine but only 0 value is not getting when i load the data.

and also can i use this excel formula in qlikview script . how i use ? I tried ,but getting error in script.

 

 

Labels (1)
3 Replies
MendyS
Partner - Creator III
Partner - Creator III

Hi @inam 

if i got you correct try to user this expression - 

alt(sum([Room Nights])/sum(TOTAL([Room Nights])),0)

regards

inam
Contributor III
Contributor III
Author

Hello Mendys Thanks For reply.

code is not working . getting same ouput 0 value is missing.

MendyS
Partner - Creator III
Partner - Creator III

@inam 

OK, I need to understand better...
In which cases do you want to display 0 and which do you want empty? 
try to expand on this, will help me understand the need...
thanks