Skip to main content
Solved

Writing DQ rule for interval values

  • November 18, 2024
  • 3 replies
  • 20 views

Forum|alt.badge.img+2

Hello all,

I want to create a DQ rule, In this rule I need to check a numeric field if the value is in the predefined interval or not. Let me give an example of logic. 

I have a column X contains β€˜types of product’ and column Y contains β€˜value of product’. And have a list of valid values. If the value of X is β€˜abc’ then Y must be in the interval 1-30. If hte value of X is β€˜xyz’ then Y must be in 1-200 and so on.

I was going to create a lookup file for this one, but couldn’t be sure how to define intervals. Does someone know how to implement my DQ rule for this logic ? 

Thanks a lot !

Best answer by ThomasPro

​@sumeyra Hello! you should be able to use the standard rule template to create this rule. By having two inputs, one for the name of the product, and another for the interval, you can specify what the interval has to be for that specific product. all youll need to do is add conditions for the product and its predefined interval.

Rule Logic: (Product is "Product Name") AND ([Product Value] < 1) or ([Product Value] > 30)

View original
Did this topic help you find an answer to your question?

3 replies

Forum|alt.badge.img+2
  • Data Pioneer L2
  • 18 replies
  • Answer
  • November 18, 2024

​@sumeyra Hello! you should be able to use the standard rule template to create this rule. By having two inputs, one for the name of the product, and another for the interval, you can specify what the interval has to be for that specific product. all youll need to do is add conditions for the product and its predefined interval.

Rule Logic: (Product is "Product Name") AND ([Product Value] < 1) or ([Product Value] > 30)


Forum|alt.badge.img+2
  • Author
  • Data Pioneer
  • 11 replies
  • November 19, 2024

Hello ​@ThomasPro , thanks for reminding this one! I don’t know why i have tried the harder solution.πŸ˜ͺ Simple and the best! πŸ‘Œ Thanks a lot. 


Forum|alt.badge.img+2
  • Data Pioneer L2
  • 18 replies
  • November 19, 2024

Of course!! Glad I could help! ​@sumeyra 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings