Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
tim_leijen
Contributor III
Contributor III

Error in expression

Hi all,

Yesterday I created the expression below,

=IF((sum({<GL_1={VOL},Dimension={LY}>}Data)=0) ,[VOL ACT],0)

After copying the table to excel, I checked and the formula is working properly.

The only issue remains, the 0's aren't a number, and so QV can't calculate. What am I doing wrong in my formula?

Putting the 0 between " " or ' ' doesn't seem to solve the issue.  Any ideas?

Capture.JPG

7 Replies
Anonymous
Not applicable

did you Format your number in tab "Number" to Integer?

if stil not working use num

=num(IF((sum({<GL_1={VOL},Dimension={LY}>}Data)=0) ,[VOL ACT],0),'#.##0')

tim_leijen
Contributor III
Contributor III
Author

Thanks for your reply Rudolf, doesn't work though... The settings for all my formulas are the same, all on "Fixed to" which does work for the others, tried all the other format settings as well though..


Now I just tried your formula, and still no totals, so there's still an issue with the 0's.....

Anonymous
Not applicable

I think I is not considered as number as there is no operation, you are returning [VOL ACT] or 0 but [VOL ACT]is not supposed to be always a number.

You should try:

IF((sum({<GL_1={VOL},Dimension={LY}>}Data)=0) ,sum([VOL ACT]),0)

tim_leijen
Contributor III
Contributor III
Author

Sorry Bobbyraj, didn't work either... :S

tim_leijen
Contributor III
Contributor III
Author

I corrected the expression, instead of calculating with another column, I corrected it to the one below, but still doesnt work

IF((sum({<GL_1={VOL},Dimension={LY}>}Data)=0) ,sum({<GL_1={VOL},Dimension={ACT}>}Data),0)

raman_rastogi
Partner - Creator III
Partner - Creator III

Try this

Sum({<Data = {"=Sum({< GL_1={'VOL'},Dimension={'LY'>}Data) =0"}>  }[VOL ACT])

Regards

Raman

tim_leijen
Contributor III
Contributor III
Author

Hi Raman, just tried, but also this one isn't working.... thanks for your suggestion anyway!