Skip to main content
Announcements
Get Ready. A New Qlik Learning Experience is Coming February 17! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
kermitt
Contributor III
Contributor III

Taking min of a ratio

Hello,

I wondered how to take the Min value of a calculated ratio in the set analysis.

In my exemple below I calculate the ratio between

=min({<[PTF_CLS_Libellé classification]={
'Euro Government fund'}>}
PTF_SENSIBILITE)/
min({<[PTF_CLS_Libellé classification]={
'Euro Government fund'}>}
PTF_BMK_SENSIBILITE)

I'd like the Min value of all the calculated ratio : I tried with this :

=min(({<[PTF_CLS_Libellé classification]={
'Euro Government fund'}>}
PTF_SENSIBILITE)/
{<[PTF_CLS_Libellé classification]={
'Euro Government fund'}>}
PTF_BMK_SENSIBILITE))

without succes.

Can you help me ?

1 Reply
Digvijay_Singh

You would need to surround your current expression with min(Aggr to calculate the minimum of all the calculated ratio.

Something like this - 

=Min(Aggr(min({<[PTF_CLS_Libellé classification]={
'Euro Government fund'}>}
PTF_SENSIBILITE)/
min({<[PTF_CLS_Libellé classification]={
'Euro Government fund'}>}
PTF_BMK_SENSIBILITE),<AggrField>))

Replace AggrField with your chart dimension. If there are more than one field then add them comma separated.

 

Thanks,