Solved

Zero times 60 equals 60?


Badge

Hi There, I am reading from a csv column in which the hours and minutes are spelled out as a string, and I want to calculate the total minutes value. So I created a series of new columns in Attribute Manger and used some Regular expressions to isolate the components of the string. However, when I use the Multiply function against a zero value in the string, I do not get zero. And as we all know zero times any number should always equal zero. Any ideas what I am doing wrong? (I have attached my workbench for reference). THANK YOU!

icon

Best answer by dustin 31 May 2022, 18:13

View original

2 replies

Userlevel 3
Badge +26

It's not that it's multiplying by 0, it's that some of your 'B' attributes do not have values. I would setup a conditional value for the 'C' attribute that looks like this screenshot. OR, you could use this expression which will return <null> for the entries without hours: @Evaluate(@Value(B)*60)image

Badge

It's not that it's multiplying by 0, it's that some of your 'B' attributes do not have values. I would setup a conditional value for the 'C' attribute that looks like this screenshot. OR, you could use this expression which will return <null> for the entries without hours: @Evaluate(@Value(B)*60)image

Yes, that absolutely worked. Thank you so much!

Reply