February 17, 200818 yr My calculation is as follows: GetAsNumber (Appointment Type). I cannot figure out why my GetAsNumber function keeps returning negative values. For instance, the following text: Diagnostic Interview (90801) returns the value of: -90801 and I want it to return: 90801 Any ideas as to what I'm doing wrong? Thanks in advance!
February 17, 200818 yr "(56)" means negative 56 in accounting. GetAsNumber apparently is interpreting that. You could try applying Filter first: GetAsNumber( Filter( Appointment Type; "0123456789"))
February 18, 200818 yr Shawn, can you explain why you still used GetAsNumber()? Wouldn't Filter() by itself have produced the same thing in this instance? I thought originally it might be because many diagnoses can contain a decimal (DSMIV, for instance) but even that wouldn't make a difference in this situation; neither would minus. You simply don't do things without reason but I can't spot it and I want to understand! Can you help me out?
February 18, 200818 yr Oh, well, leading zeros I suppose - if they should be dropped off. Edited February 18, 200818 yr by Guest
February 18, 200818 yr Filter ( "Diagnostic Interview (0123)" ; "0123456789" ) = "0123" GetAsNumber ( Filter ( "Diagnostic Interview (0123)" ; "0123456789" ) ) = 123 BTW: Abs ( "Diagnostic Interview (0123)" ) = 123
February 18, 200818 yr Oh, well, leading zeros I suppose - if they should be dropped off. That's a good reason but I didn't even think it over - the original was returning a number type so I was just sticking with that. :
Create an account or sign in to comment