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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
mhc4qlik
Contributor II
Contributor II

RangSum in Text Object

Hello Communitiy,

I have an RangeSum Issue in Qlikview. that I cannot solve on my own. I realy hope you can help me.

Is it possible to sort a field in the rangeSum function?. It should start to sum with the largest value.

I tried to build a small example. I have generated three fields with an Inline Table. Supplier, Spend and Complete Spend.

At the end there should be only one Number in a text object: The Amount of Suppliers, who has 80% of the Total Spend.

It is important to start with the largest number.

The Number in the Table is right. 5 is correct, but I cannot get the right number in the text object.:

count(
aggr(
if(
(
rangesum(Above(Total sum(SPEND),0,RowNo(Total)))
/
COMPLETE_SPEND) <= 0.8,
count(SPEND))
,
SPEND)
)

Thank you in advance!

12 Replies
mhc4qlik
Contributor II
Contributor II
Author

Thank you for your help!

But Sunny is right. The number should change based on selections. I solved it now by generating a sorted table in the script . By storing it in a qvw and loading it again the numbers are sorted and my function in the text object works!

kavita25
Partner - Specialist
Partner - Specialist

Can u please share the app..

I have the same requirement

mhc4qlik
Contributor II
Contributor II
Author

Hello Kavita,

of course I can share the app.

There are two qvws. In the first step I sort the table and store it in a qvd. Then I can use the function in the text object in the second qvw.

I hope it helps.