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

Show only the 10 largest ABSOLUET values

Hi,

Is there a way to show in a graph the 10 largest absolute values? (indeed I have positive and negative value in my bar chart).

Thanks.

1 Solution

Accepted Solutions
Not applicable
Author

Hi Jerome,

Please check the attached app.

Try to use calculated dimension as below

=aggr(if(rank(fabs(Sum(Value)))<=10,Dimension),Dimension)

Keep the Label as "Dimension", also check the "Suppress When Value is Null" in the same properties pane for Dimension

In the "Expressions" use "Sum(Value)" with respective Label "Value"

Finally in the "Sort" properties pane, use Expression as sort order for Dimension, with the below expression

rank(fabs(Sum(Value)))

Order as Ascending

Kindly replace the Dimension and Value with your required dimension and fact values

Thanks,

Sri

View solution in original post

7 Replies
jagan
Luminary Alumni
Luminary Alumni

Hi,

In expression use Fabs(Expression), and restrict the records, sort the chart by Expression Descending in Sort tab and by using Dimension Limits - > Show only -> Largest 10 values .

Regards,

Jagan.

Not applicable
Author

Thanks for the quick answer but I was not precise enough.

Is it possible to keep showing positive/negative values on the graph but only show the 10 largest absolute values?

Not applicable
Author

Hi Jerome,

Please check the attached app.

Try to use calculated dimension as below

=aggr(if(rank(fabs(Sum(Value)))<=10,Dimension),Dimension)

Keep the Label as "Dimension", also check the "Suppress When Value is Null" in the same properties pane for Dimension

In the "Expressions" use "Sum(Value)" with respective Label "Value"

Finally in the "Sort" properties pane, use Expression as sort order for Dimension, with the below expression

rank(fabs(Sum(Value)))

Order as Ascending

Kindly replace the Dimension and Value with your required dimension and fact values

Thanks,

Sri

tresesco
MVP
MVP

Use Fabs(), may be something like:

Calculated dimension:  =Aggr(If(Rank(Fabs(Sum(Expression))) <= 10,Customer),Customer)

jagan
Luminary Alumni
Luminary Alumni

Hi,

It is not possible to show positive and negative values in graph, use Fabs() to convert and use another expression without fabs() and display it as a Label by using

Chart Properties -> Expression -> Show as Popup

Regards,

Jagan.

Not applicable
Author

Thanks!

Not applicable
Author

Hi Jerome,

If this query is answered, kindly mark the same as answered.

Thanks,

Sri