# New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
QlikWorld Online 2021, May 10-12: Our Free, Virtual, Global Event REGISTER TODAY
cancel
Showing results for
Did you mean:
Contributor

## find best dimension by metric from a filtered dimension list

Hi everyone!

First time asking a question 🙂

We have some kind of feedback screen, and I want to create a KPI view of the language with the highest good feedback rate. However, I only want to include languages where we have a minimum number of feedbacks.

I managed without the filter to get to this:
FirstSortedValue(language, -Aggr(Count({<speed_feedback = {'good'}>}distinct email)/count({<first -= '-'>} distinct email), language))

Which works, but I can't seem to manage to create a filter by language count for example. Something like count(language) > 50
as an example.

Thanks for helping out!

1 Solution

Accepted Solutions
Master

A bit hard to write it out perfectly without access to your data, but using a bit of random inline data:

A, B
A, 1
A, 2
A, 3
B, 9
C, 2
C, 5
];

Formula:

FirstSortedValue(A, if(Aggr(Count(B),A)>1,-Aggr(Avg(B), A)))

In this example, it should pick out the A with the highest average B, but only for values of A with at least two rows. Hopefully you can adapt this to your actual situation.

2 Replies
Master

A bit hard to write it out perfectly without access to your data, but using a bit of random inline data:

A, B
A, 1
A, 2
A, 3
B, 9
C, 2
C, 5
];

Formula:

FirstSortedValue(A, if(Aggr(Count(B),A)>1,-Aggr(Avg(B), A)))

In this example, it should pick out the A with the highest average B, but only for values of A with at least two rows. Hopefully you can adapt this to your actual situation.

Contributor
Author

It worked! You understood perfectly 🙂

Thank you very much!