Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have two tables -
eg -
T1 T2
T1F1 T1F2 | T2F1 T2F2
abcd 65 | xyz 10002
xyz 100 | efg 10029
lpq 19 | mno 10078
I want to show value of T2F2 for T2F1 = xyz . Ideally I need to get T1F1 with highest T1F2 value and show T2F2 for the same value in a text and image object. For simplicity let's hard code the value 'xyz'
I have tried
=if(min([T2F1] like 'XYZ'),'Y','N')
from a different post which returns Y but when I replace 'Y' with the field name nothing gets returned.
=if(min([T2F1] like 'XYZ'),T2F2,'N')
The table T2F2 contains unique values for T2F1.
Would appreciate any help as I am a newbie to qliksense.
Thanks.
I don't know what the reason is but see attached.
Regards
I am sorry about this. I open the .qvw file but I don't see anything. Can you please guide me to what I should be looking for ?
here is a screenshot, hope you can see
Honestly, I don't get it
but I think this will help you
first in the script :
T1:
LOAD T1F1 as Key,* INLINE [
T1F1,T1F2
abcd,65
xyz,100
lpq,19
];
T2:
LOAD T2F1 as Key,* INLINE [
T2F1,T2F2
xyz,10002
efg,10029
mno,10078
];
LOAD
FirstSortedValue(T1F1,-(T1F2)) as MaxT1F_
Resident T1
;
LET vMaxT1F1 =peek('MaxT1F_');
and then in the text/image object :
=only({<T2F1={$(vMaxT1F1)}> } T2F2)
Thank you for this. I do see it and it is working fine. But is there any reason as to why the if expression was not working ?
T2F1 is a string !
min(T2F1) ->minstring(T2F1)
but it's not good to use it like that also you must to aggregate ....
Thank you.