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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
mikecrengland
Creator III
Creator III

Rank, Aggr questions

At least, that's what I think I need.

We have field marketing reps that visit retail locations and report on purchase decisions. I want to report on the top three responses by month:

Purchase ReasonsJanFebMar
Top ReasonBattery LifeBattery LifeColor
Second ReasonBrandColorBrand
Third ReasonColorBrandBattery Life

I though I could use valuelist() to create the rows and an expression like:

=If(

  Rank(Aggr(Count(DISTINCT CallReport.Key),DecisionReason)) = 1,

  DecisionReason)

to get the 'Top Reason' row.

To test it, I put that into a text object and get nothing back.

Am I close?

1 Solution

Accepted Solutions
jpapador
Partner - Specialist
Partner - Specialist

Try:

If(Aggr(Rank(Count(CallReport.Key)), DecisionReason) = 1, DecisionReason)

If you are doing it in a text box put an only around it,

Only(If(Aggr(Rank(Count(CallReport.Key)), DecisionReason) = 1, DecisionReason))

View solution in original post

2 Replies
jpapador
Partner - Specialist
Partner - Specialist

Try:

If(Aggr(Rank(Count(CallReport.Key)), DecisionReason) = 1, DecisionReason)

If you are doing it in a text box put an only around it,

Only(If(Aggr(Rank(Count(CallReport.Key)), DecisionReason) = 1, DecisionReason))

mikecrengland
Creator III
Creator III
Author

Thank you!