Calculation based on dropdown selection, text element get the value from previous selection not the current.

hi, guy just as the titles says. I have a text element to show the result of a calculation based on a dropdown selection, but it only show the result of the previous selection not the actual.

this is the code:

import wixData from ‘wix-data’;

$w.onReady( function () {
export function dropdown5_change(event, $w) {
let sk = $w(‘#skilldmg’).value;
let a = $w(‘#unitatk’).value;
$w(“#dataset2”).setFilter( wixData.filter().eq(“titleAlias”, $w(“#dropdown5”).value));
$w(‘#text29’).text = String(Math.round(a*sk));

i hope anyone can help me out. thanks!