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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
GeorgeEard
Contributor III
Contributor III

Measure to score based on quartiles.

Hi,

I would like to make a measure that scores 'Partners' on the count of their 'agreements'. The partners in the top quartile, with the highest number of agreements get a score of 12, the quartile under gets 5, under that 1 and then 0.

I have tried:

IF(
Aggr(count([Agreements), [Partner]) >= Fractile(TOTAL [Agreements], 0.75), 12,
IF(
Aggr(count([agreements), [Partner]) >= Fractile(TOTAL [Agreements], 0.50), 5,
IF(
Aggr(count(Agreements), [Partner]) >= Fractile(TOTAL [agreements], 0.25), 1,
0
)
)
)

However this has not worked.

Thank you!

Labels (2)
1 Solution

Accepted Solutions
JandreKillianRIC
Partner Ambassador
Partner Ambassador

Hi @GeorgeEard 

JandreKillianRIC_0-1737379241326.png

This is the correct expression to use. 

IF(
Aggr(Count(Agreement), [Partner]) >= Fractile(Total Aggr(Count(Agreement), Partner), 0.75), 12,
IF(
Aggr(Count(Agreement), [Partner]) >= Fractile(Total Aggr(Count(Agreement), Partner), 0.50), 5,
IF(
Aggr(Count(Agreement), [Partner]) >= Fractile(Total Aggr(Count(Agreement), Partner), 0.25), 1,
0
)
)
)

Mark the solution as accepted that solved your problem and if you found it useful, press the like button! Check out my YouTube Channel | Follow me on LinkedIn

View solution in original post

2 Replies
JandreKillianRIC
Partner Ambassador
Partner Ambassador

Hi @GeorgeEard 

JandreKillianRIC_0-1737379241326.png

This is the correct expression to use. 

IF(
Aggr(Count(Agreement), [Partner]) >= Fractile(Total Aggr(Count(Agreement), Partner), 0.75), 12,
IF(
Aggr(Count(Agreement), [Partner]) >= Fractile(Total Aggr(Count(Agreement), Partner), 0.50), 5,
IF(
Aggr(Count(Agreement), [Partner]) >= Fractile(Total Aggr(Count(Agreement), Partner), 0.25), 1,
0
)
)
)

Mark the solution as accepted that solved your problem and if you found it useful, press the like button! Check out my YouTube Channel | Follow me on LinkedIn

GeorgeEard
Contributor III
Contributor III
Author

Thanks so much!