Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
joeybird
Creator III
Creator 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
jonathandienst
Partner - Champion III
Partner - Champion III

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

View solution in original post

7 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

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
jonathandienst
Partner - Champion III
Partner - Champion III

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
jonathandienst
Partner - Champion III
Partner - Champion III

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
Creator III
Creator III
Author

Hiya

I get expression error

please help

joeybird
Creator III
Creator III
Author

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

jonathandienst
Partner - Champion III
Partner - Champion III

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

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

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