Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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

Re: Why does my expression return a zero value

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.

5 Replies
MVP
MVP

Re: Why does my expression return a zero value

expression looks ok.

can you share your sample file?

carlos_reyes_qv
Valued Contributor

Re: Why does my expression return a zero value

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

Not applicable

Re: Why does my expression return a zero value

TRy with this:

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

/

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

Employee
Employee

Re: Why does my expression return a zero value

Where this expression is beeing used?

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

Not applicable

Re: Why does my expression return a zero value

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.

Community Browser