Qlik Community

Qlik Brasil

Group community for Brazil users. discussion only in Portuguese.

Highlighted
jsobrinho
New Contributor III

Improve Set analysis logic

Hi team,

Could you please, help me improve the set analysis:    


if(GetSelectedCount(Country)>=1 and GetSelectedCount([Type])>=5,

if(ID=1

FirstSortedValue({<Type={"$(vType5)"},Country={"$(vCountry1)"}>}Value1, -Total),

FirstSortedValue({<Type={"$(vType5)"},Country={"$(vCountry1)"}>}Value2, -Total),


if(GetSelectedCount(Country)>=5 and GetSelectedCount([Type])>=1,

if(ID=1

FirstSortedValue({<Type={"$(vType1)"},Country={"$(vCountry5)"}>}Value1, -Total),

FirstSortedValue({<Type={"$(vType1)"},Country={"$(vCountry5)"}>}Value2, -Total),

if(GetSelectedCount(Country)>=2 and GetSelectedCount([Type])=4,

if(ID=1

FirstSortedValue({<Type={"$(vType1)"},Country={"$(vCountry2)"}>}Value1, -Total),

FirstSortedValue({<Type={"$(vType1)"},Country={"$(vCountry2)"}>}Value2, -Total),

),

)


Its possible improve this logic?


Tags (1)