Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
SunilChauhan
Champion II
Champion II

expression not giving accurate result on selection

hello all,

i am caal calculaating this exp

if(max_Spectral_Efficiency=max_Spectral_efficiency,'Top 1',

if(max_Spectral_Efficiency=max_Spectral_efficiency or max_Spectral_Efficiency=max2_Spectral_efficiency,'Top 2',

if(max_Spectral_Efficiency=max_Spectral_efficiency or max_Spectral_Efficiency=max2_Spectral_efficiency or max3_Spectral_Efficiency=max_Spectral_efficiency,'Top 3')))











showing all values. but when i seleecting one of Top1,Top2,Top3 atleast one is not giving correct result.

its urgent please help me.

thanks

sunil



Sunil Chauhan
3 Replies
suniljain
Master
Master

Check your IF condition.

I think, There should be AND instead of OR in second statement

Not applicable

Without an example I don't really know for sure, but since it's urgent I'd have to guess that maybe some of your rows are returning multiple values.

For example if:

max_Spectral_Efficiency=max_Spectral_efficiency is true and if

max_Spectral_Efficiency=max2_Spectral_efficiency is true

it would return 'Top 1' and 'Top 3' so it wouldn't return anything

I wasn't sure what exactly "show all values" did so I did a quick test:

LOAD * INLINE [
F1, F2
6, A
6, B
6, C
];

Made a chart to show all values with F1 as dimension and F2 as expression and nothing showed up even though "show all values" was checked, so my guess is that show all values doesn't do what you think it does.

Or I could be completely wrong.

suniljain
Master
Master

Agree with Jones.

pls correcr if condition so that each statement satisfied only one time.