Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
joeybird
Contributor III

calculation - range sum

Hiya

I want to show difference for each department - per week

I have this calculation

rangesum( above( sum(ORDERS),0,rowno()))

its adding up the rows...I wish to show difference

e.g

week 1 = 30

week 2 = 35

difference is 5

Please help

1 Solution

Accepted Solutions
MVP
MVP

Re: calculation - range sum

For difference you just need:

=Sum(ORDERS) - Above(Sum(ORDERS)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
7 Replies
MVP
MVP

Re: calculation - range sum

For difference you just need:

=Sum(ORDERS) - Above(Sum(ORDERS)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
MVP
MVP

Re: calculation - range sum

If the table has multiple dimensions, you will need

=Sum(ORDERS) - Above(TOTAL Sum(ORDERS)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
MVP
MVP

Re: calculation - range sum

Assuming Department is the first dimension and date is the second:

=If(Department = Above(TOTAL Department), Sum(ORDERS) - Above(TOTAL Sum(ORDERS), 0)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
joeybird
Contributor III

Re: calculation - range sum

Hiya

I get expression error

please help

joeybird
Contributor III

Re: calculation - range sum

Hiya

I got it to work with a slight change

Sum(Orders) - rangesum( Above(Sum(Orders)))

I have a number of weeks to show

e.g week 1, week 2, week, 3

I don't wish to show week 1

so chart with show

e.g

5, 12, ect

not

30, 5, 12

how can this be achieved please?

Kind Regards

MVP
MVP

Re: calculation - range sum

=Alt(Sum(Orders) - Above(Sum(Orders)), 0)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
joeybird
Contributor III

Re: calculation - range sum

Hiya

this is great

however

I have a customer, that has the value of e. 20

on my line chart he appears as -20, but as soon as you click on customer individually ... he appears as 20

any ideas why please

Community Browser