Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Trying to find the lowest value per Dimension, possibly aggr()?

Hello,

I have a chart and I need to identify the lower Incentive value for each %ADAcctKey.

The Incentive value is a calculated value.  In the example below 445 would flag 10% and for 2544 the lowest flagged would be 0%.

    

%ADAcctKeyMetricDescQAAdherenceRevenueSavesLevelTargetIncentive
445QA87.50% Target80% >=10%
445Adherence 88.04% Target88% >=10%
2544Save Rate 26.09%Stretch22% >=20%
2544QA81.68% Target80% >=15%
2544Adherence 74.34% Below85% <0%
2544Revenue $335.40 Below$750 <0%

Thank you for you help.

11 Replies
swuehl
MVP
MVP

You probably have some code after the script snippet you've posted above, but just to be sure:

Are you dropping table load_IncentiveScores after transforming the columns to rows? If not, you will create a synthetic table that will link the columns with same name. In your scenario, I believe that's not what you want.

Do you have a synthetic table in your data model?

Again, if you want us to help you, you need to post more detailed information about your data model, best by creating a small sample QVW that demonstrates this issue.

Anonymous
Not applicable
Author

App showing the Aggr() value on the wrong row.

I also attempted this with Rank() during my process but that is additional work on the load script.

Look at the table 'Using Aggr() - Minimum Score'  with EmpID 31480 if it's not selected.  You will see using Aggr( Min(AchievedIncentive), EmpID) places the lowest score in 15% when it's really 10%.  This works correctly on the majority of the values.

Thank you everyone for your help.  I have been able to create what I needed and part of the problem was how the app that feeds these numbers was built.  I have uploaded an app that takes the raw scores and builds what I need.  I will work further to have the back in the source app but this is working for now.