your error has triggered by full stop in 26.1.
you have applied this command:
cast(kpi as varchar(3))
First: change cast from varchar(3) to varchar(4) (to get the first value after full stop)
So you'll have:
This line convert value 26.10000000 in 26.1
Then you apply varchar(26.1)
not correct!
Varchar type wants only integer value as size.
Why you apply the last varchar?? I think you must to remove the external varchar and leave only cast function