Hi All,
I am trying to get unique values in a column through associative array. When I place it in the array, it automatically gets chopped off like 1.759 chopped to 1. What is the best way to do it?
My second question is : I am trying to call the value and plot it as a line in the graph using the Num() function.
Add Ref Line( Num(currentL1),"Dashed","Medium Dark Blue","", 1 )
Where unique L1= Associative Array( qdt:L1);
N Items( unique L1 );
unique L1 << Get Keys;
currentL1 = unique L1 << First;
Will this work or is it going to chop off the decimal points again?
I really appreciate your help.
Thank you.
Hi @vishwasanj,
Yeah, associative array is not very helpful with floating point numbers. You're always going to end up with truncated key values. A klugey solution would be to multiply the numbers by 100, 1000, etc. and then divide the keys by that same number afterward getting the keys. You will lose the smaller digits, but that could work in some situations.
Finding unique numeric values is a common question on this forum. The best solution I have seen is using Summary. See @txnelson's answer here.