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: 
Not applicable

Why does my expression return a zero value

I have an expression written as follows:

fabs(sum({<ItemCategory={'Classbook Reprints'}>}ITEM_COUNT))/fabs(sum({<ItemCategory={'Classbook Original Manuscripts'}>}ITEM_COUNT))

This returns a value of zero.

However, when I break the two pieces out on their own, each returns a value. Why when I divide the sums against eachother, am I getting a zero?

The first section returns a value of 130451. The 2nd section returns a value of 15583.

The result I am trying to arrive at through my expression is 8.37.

1 Solution

Accepted Solutions
Not applicable
Author

I found the issue. Apparently this type of expression won't work when using a Gauge Chart.

After trying the expression in a text object it works as expected.

View solution in original post

5 Replies
MK_QSL
MVP
MVP

expression looks ok.

can you share your sample file?

Carlos_Reyes
Partner - Specialist
Partner - Specialist

Strange.... perhaps you need to change the Number Format Setting in the Object properties.

Not applicable
Author

TRy with this:

(fabs(sum({<ItemCategory={'Classbook Reprints'}>}ITEM_COUNT)))

/

(fabs(sum({<ItemCategory={'Classbook Original Manuscripts'}>}ITEM_COUNT)))

Clever_Anjos
Employee
Employee

Where this expression is beeing used?

A textbox or a graph? If you´re using a graph, please check number format

Not applicable
Author

I found the issue. Apparently this type of expression won't work when using a Gauge Chart.

After trying the expression in a text object it works as expected.