Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
richters
Partner - Contributor III
Partner - Contributor III

Not able to multiply two variables in script

Hi all,

I have got a short question.

I am trying to multiply 2 variables:

let rundung = $(aktuellesV)*$(j);

They both should contain numbers. I am able to multiply j by j but there must be an issue with aktuellesV.

When I trace it, it looks like a number. I also tried it with the num()-function.

Does someone has got an idea how to deal with it?

Thanks in advance!

Labels (1)
3 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

No idea what aktuellesV is or how it is created, but you have to make sure it is a number. Using num on a string will return a null, so that's not going to help if aktuellesV is a string. Maybe num# can help, but it's better to make sure you use a number when you create the variable.


talk is cheap, supply exceeds demand
richters
Partner - Contributor III
Partner - Contributor III
Author

aktuellesV is created with LEt aktuellesV=num(peek('hilfsverhaeltnis',$(i),'Hilfsfall'),'0,0####'); . I know that in hilfsverhaeltnis there are just numbers.

richters
Partner - Contributor III
Partner - Contributor III
Author

Well, I dont get it. isnum() returned a -1 which means, it defenitely was a number. However, I had to replace the ',' with a '.' in the number to be able to multiply that...funny thing.