Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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!
A bit hard to write it out perfectly without access to your data, but using a bit of random inline data:
Load * INLINE [
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.
A bit hard to write it out perfectly without access to your data, but using a bit of random inline data:
Load * INLINE [
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.
It worked! You understood perfectly 🙂
Thank you very much!