What is IA's ROUND function?

This forum contains ProfileStage posts and now focuses at newer versions Infosphere Information Analyzer.

Moderators: chulett, rschirm

Post Reply
truenorth
Participant
Posts: 139
Joined: Mon Jan 18, 2010 4:59 pm
Location: San Antonio

What is IA's ROUND function?

Post by truenorth »

I have a rule that says A must be B*(1-C).

Problem is A is coming from a table, a decimal(21,3) field.

But the calculation is coded in the rule and has no rounding. So I'm getting rule violations of 0.633 versus 0.633012.

So I need to round the calculation to 3 decimal places.

I found documentation that says it is ROUND. But it is for v9.x or later. I also tried FIX, no luck.

Someone out there must know?

Thanks in advance.
Last edited by truenorth on Tue Feb 09, 2016 5:19 pm, edited 1 time in total.
Todd Ramirez
Sr Consultant, Data Quality
San Antonio TX
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Re: What is IA's ROUND function?

Post by qt_ky »

Just as a guess, could you use REGEX? The IA 8.7 guide suggests that "You can use a expression that can be made up of scalar functions, arithmetic operations and variables as a source data. If you use this expression, make sure that the expression evaluates to a character or string data type."

Or could you upgrade your IA version?
Choose a job you love, and you will never have to work a day in your life. - Confucius
truenorth
Participant
Posts: 139
Joined: Mon Jan 18, 2010 4:59 pm
Location: San Antonio

Post by truenorth »

I don't think REGEX would do the job, because I still need to test the equality between the two values.

However, I came up with a solution:

tostring(A, '%f24.2') = tostring(B * (1 - C), '%f24.2')

Why .2? I decided to loosen the rule because the calculation and the resulting rounding might do funny things so that too many records might violate the rule. Two decimal places of precision softens the rule. A few exceptions may still slip thru - like 1.399 being rounded to 1.4 - but we can live with a few rather than many thousands of exceptions that business would not care much about.
Todd Ramirez
Sr Consultant, Data Quality
San Antonio TX
truenorth
Participant
Posts: 139
Joined: Mon Jan 18, 2010 4:59 pm
Location: San Antonio

Post by truenorth »

We are upgrading to 11.5 very soon so yeah!
Todd Ramirez
Sr Consultant, Data Quality
San Antonio TX
Post Reply