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

Get second, third... best variable

Hi everyone !

I have in my Qlikview Ptrojet a population and in this population a number of good people. I wanna to know which variable and which selected modality increase the most the percentage of my good people in the all population. Every one is identified with an ID.

For exemple: if i have the variable : Hapiness with two modality 'high' 'low' so Hapiness= high or low

and a second variable Money= 'lot of' or 'few', the i would like to know which of the following percent is the highest :

          - Count( if [Person]='Good' and [Hapiness]='high', ID)) / Count (if ( [Hapiness]='high' , ID))

          - Count( if [Person]='Good' and [Hapiness]='low', ID)) / Count (if ( [Hapiness]='low' , ID))

          -Count( if [Person]='Good' and [Money]='lot of', ID)) / Count (if ( [Money]='lot of' , ID))

          - Count( if [Person]='Good' and [Money]='few', ID)) / Count (if ( [Money]='few' , ID))

Thank’s to dathu.qv i found this solution :

1. Dual('HappinessHigh', Count( if [Person]='Good' and [Hapiness]='high', ID)) / Count (if ( [Hapiness]='high' , ID)) )

2. Dual('HappinessLow', Count( if [Person]='Good' and [Hapiness]='low', ID)) / Count (if ( [Hapiness]='low' , ID)) )

3. Dual('MoneyLot', Count( if [Person]='Good' and [Money]='lot of', ID)) / Count (if ( [Money]='lot of' , ID)) )

4. Dual('MoneyFew', Count( if [Person]='Good' and [Money]='few', ID)) / Count (if ( [Money]='few' , ID)) )

Use RangeMaxString() function to get the respective variable name.

RangeMaxString( var1, var2, var3, var4 )

Now, i would like to know how to get the second best % , the third one..

Pleaaase help me !!

Thank’s

Am’

0 Replies