Comparison calculation for price variation check

Seven Stars RAJ
Seven Stars

Comparison calculation for price variation check

Hi Talend Folks,

 

Check the Yesterday Price with Today Price. if today's price is more than 5% of Yesterdays Price then i need to set below values

"Not Ok" else "Ok'

 

How to write query for above scenario.

I tried but i don't know logic is correct or wrong. could please tell me ?

 

row1. Today_Price  >(row1. Yesterday_Price *0.05)? "Not OK" : "OK"

Thanks
RAJ
Sixteen Stars

Re: Comparison calculation for price variation check

The expression looks OK to me. Have you tried it? The only thing I can think that could cause problems is if either "Today_Price" or "Yesterday_Price" is null

Ten Stars

Re: Comparison calculation for price variation check

Are you sure the requirement is to check if the price is more than 5% of yesterday's price and not a change of more than 5%?

Seven Stars RAJ
Seven Stars

Re: Comparison calculation for price variation check

Ya Sure. 

Thanks
RAJ

Tutorial

Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.