You should call data() instead attr(), rewrite you code like this :
function setattr(brnditem)
{
var test = $(brnditem).find("option:selected").data('um');
console.log(test);
}
Im using laravel. anyways, my table is populated from the database and every select options inside the <td> as well. still undefined. :( or maybe ill try a different approach.