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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
RAJ6
Contributor III
Contributor III

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"

Labels (1)
3 Replies
Anonymous
Not applicable

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

cterenzi
Specialist
Specialist

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%?

RAJ6
Contributor III
Contributor III
Author

Ya Sure.