Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Agrr + above function not working as expected

Hi, I have a fill rate calculation based on first item >90% for cumulative ratio and then the immediate before.

I have a dummy data set with 2 columns Region and OrderTime, sorted by Region

When I create what I want in a table chart, it is just fine, the cumulative orders are ok so the ratio and finally the fillrate, for both regions available (AMs & EMEA)

AMS                                                                                                         EMEA

table.JPGtable2.JPG

But as this is not the format I want, I'm re-creating the whole formula in a texbox to get to the final fillrate, it works ok for AMS only (as it is the first region sorted in raw data file) but when I filter EMEA the cumulaive sum is wrong (ONLY IN TEXT NOT TABLE). I i manually move EMEA to the top it works now for EMEA  but not AMS, if I mix the records none work.


AMS                                                  EMEA

AMS.JPGtext2.JPG<-----wrong cumulative, compare vs. table above

See files attached

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hello,

in the attached qvw you can find a solution (pink text box).

In the script editor I changed you code, ordering records and assigning to them an ID (a progressive number): my script can be improved....

With this unique ID I think you can solve the problem: make some tests and let me know if it's correct for you.

Thanks and KR

Elena

View solution in original post

2 Replies
Anonymous
Not applicable
Author

Hello,

in the attached qvw you can find a solution (pink text box).

In the script editor I changed you code, ordering records and assigning to them an ID (a progressive number): my script can be improved....

With this unique ID I think you can solve the problem: make some tests and let me know if it's correct for you.

Thanks and KR

Elena

Anonymous
Not applicable
Author

Thanks a lot Elena!