Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
rustyfishbones
Master II
Master II

FABS not Working in Text Object

Hi All,

I can use FABS function in a straight table, however when I use it in a text object it does not return the correct result.

FABS(SUM({<TaskId = {'*ADJUST*'}>}[#Act-Second]))

Any ideas why it aint correct in the text object but its ok in the table, should I be removing the null values.

Regards

Alan

1 Solution

Accepted Solutions
sunny_talwar

May be try this

Sum({<TaskId = {'*ADJUST*'}>} Fabs([#Act-Second]))

or this

Sum(Aggr(fabs(Sum({<TaskId = {'*ADJUST*'}>} [#Act-Second])), ChartDimensions))

View solution in original post

4 Replies
sunny_talwar

May be try this

Sum({<TaskId = {'*ADJUST*'}>} Fabs([#Act-Second]))

or this

Sum(Aggr(fabs(Sum({<TaskId = {'*ADJUST*'}>} [#Act-Second])), ChartDimensions))

rustyfishbones
Master II
Master II
Author

ok, this works, but I need a better way

=FABS(SUM({<TaskId = {'*ADJUST*'}, [#Act-Second] = {">0"}>}[#Act-Second]))

+ FABS(SUM({<TaskId = {'*ADJUST*'}, [#Act-Second] = {"<0"}>}[#Act-Second]))

rustyfishbones
Master II
Master II
Author

First one worked thanks

msvanfeldt
Partner - Contributor II
Partner - Contributor II

I think the problem is the single quotes in the set expression.
Single quotes means exact value. Use double quotes to make a search.

FABS(SUM({<TaskId = {"*ADJUST*"}>}[#Act-Second]))

See the blogpost https://community.qlik.com/blogs/qlikviewdesignblog/2017/09/11/quotes-in-set-analysis