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: 
narumonK
Contributor II
Contributor II

why the result is 0.00 ?

Please help 

 

when i create an expression 

(SUM({<company= {"=Rank(SUM({<year={$(VreportYY)}>}amount),4)<=10"}>}amount)-
SUM({<company= {"=Rank(SUM({<year={$(VpriorYY)}>}amount),4)<=10"}>}amount))/
SUM({<company= {"=Rank(SUM({<year={$(VpriorYY)}>}amount),4)<=10"}>}amount)

 

the result is 0.00 but the true is  -32.38 

what happen?

3 Replies
Vegar
MVP
MVP

I would start testning each SUM(...) separately to identify which amounts they return.

When you've done that you will probably be able to pinpoint your issue more exactly. 

jaibau1993
Partner - Creator III
Partner - Creator III

Hi! When you calculate the difference you write

SUM({<company= {"=Rank(SUM({<year={$(VreportYY)}>}amount),4)<=10"}>}amount)

-
SUM({<company= {"=Rank(SUM({<year={$(VpriorYY)}>}amount),4)<=10"}>}amount)

What you are calculating there is: Sum of the amount of the ten best companies this year minus sum of the amount of the ten bes companies of the prior year, all within the current set of selections. Note that this will be 0 if the top 10 companies of this year coincide with the top ten companies of the previous year.

Said so, maybe what you want is: sum of the current year amounts of the ten best companies this year minus sum of the previous year amount of the ten best companies of the previous year. This should look similar to

SUM({<year = {$(VreportYY)}, company= {"=Rank(SUM({<year={$(VreportYY)}>}amount),4)<=10"}>}amount)

-
SUM({<year = {$(VpriorYY)}, company= {"=Rank(SUM({<year={$(VpriorYY)}>}amount),4)<=10"}>}amount)

But this is pure speculation, we need more datails so we can help you, as Vegar pointed.

Greetings,

Jaime.

Brett_Bleess
Former Employee
Former Employee

Narumon, did either of the two posts help you out with things?  If so, be sure to use the Accept as Solution button on the post(s) that helped to let others know and give the posters credit for the help.  If you are still working on things, leave an update.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.