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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Median in tAggregateRow

Hello!
Is there a way to get the Median in tAggregateRow?
I couldn't find a way 0683p000009MPcz.png
thx
Labels (2)
3 Replies
alevy
Specialist
Specialist

I suggest you add a new feature request on the BugTracker or add it to this one.
Anonymous
Not applicable
Author

Okay. I'll try to get a change.
But I think there must be a way to get the median in a different way..
Please help - I don't have any ideas 0683p000009MPcz.png
Thanks!
alevy
Specialist
Specialist

I can't think of a nice one but you could first sort your data then generate a sequence number for each row (use Numeric.sequence("sequencename",1,1)) and temporarily store the flow (using tFileOutput or tHashOutput). Then read back the stored rows to retrieve the value from the count/2 row (either read only that many rows and then use the last function in tAggregateRow or use a tJavaRow to store the value only when the sequence number equals count/2; get the count from the NB_LINE globalMap variable of your output component).