Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

incorrect result with MAX(A,ROUND(COUNT(B)*0.95))

Hi All,

i'm new the Qlik

just rather a simple to set in the expression

sample data

      

1          Z1

2          Z2

3          Z3

4          Z4

the flow to achieve,

1) Sort A

2) 95% of the total row = 3.8

3) Round 3.8 = 4

4) get the 4th sorted row

5) return Z4

i tried to use below

MAX(A,ROUND(COUNT(B)*0.95)) but it always return the max value even tried to manipulate the value by MAX(A,ROUND(COUNT(B)*0.95)-2) still getting the max value.


fractile unable to perform above..


thanks all.

3 Replies
sunny_talwar

Try this may be:

=Min(A, $(=Round(Count(B) * 0.95)-2))

Anonymous
Not applicable
Author

What exactly you want??

You are using MAX(), so its obvious it woud return maximum value

swuehl
MVP
MVP

Not sure what you are trying to achieve. If A is a primary, sequential numeric key, you can use

=Only({<A = {$(=Round(Count(B) * 0.95))}>} B)

to return 'Z4'