Electrodes based on the most selective ionophore -valinomycin were used to quantify potassium in different, real samples. Results showed high precision but low accuracy for samples of more complex composition and higher ionic strength (beetroot soup, dried fruit, tomato juice). To account for the background changes different composition of the sensing array were tested. Best results were obtained for an ensemble Random Forest algorithm based on only two types of sensors. In this case the root mean square error of prediction was almost six times lower than when quantification of potassium was achieved using a standard calibration curve.