Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
This is probably a really easy question for someone who isn't a novice with QlikSense, but I'm trying to do the following, and could use some help.
I have a series of data in a bar chart and a KPI that shows the highest amount in that data. But I also want to display the name associated with that value in a box next to it - either a second KPI or text box. I have been able to do that when only a single name value is selected, but when it's not filtered for a particular person, it shows up blank. Screenshot is attached to give you an idea. In this example, Matt Mawson's name should appear in the box next to the Pts Leader.
What is the expression that you are using to create the bar chart? Is it Sum(Points) or Avg(Points)? Assuming it is Sum(Points), try this:
FirstSortedValue(FullName, -Aggr(Sum(Points), FullName))
You should be able to use FirstSortedValue() function here, not sure what you expression is, but something like this:
FirstSortedValue(Name, -Aggr(YourBarChartExpression, Name))
Thanks Sunny. It didn't quite work, but I may be interpreting your note incorrectly. This is the expression I just created, but it's returning an error:
FirstSortedValue(FullName,-Aggr(Max(Points),FullName)
with "FullName" being the name field I want to return and Points being the Max value in the KPI to the right. When you say "YourBarChartExpression", I wasn't sure what I should replace that with.
What is the expression that you are using to create the bar chart? Is it Sum(Points) or Avg(Points)? Assuming it is Sum(Points), try this:
FirstSortedValue(FullName, -Aggr(Sum(Points), FullName))
Sunny - you're the best! Thanks so much - that worked!