Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I have a product_id for which want to only include data till 2015,
but for 2016 i dont want to include that in the script.
for example only include data for product_id 126 till 2015 not in 2016.
How can i do this in the script?
Please help.
Thanks & Regards,
Jaya
May be like this:
LOAD *
FROM Source
Where not (Product_id = 126 and Year = 2016);
Hi
Try like this
Load * from yourtablename where Year < 2016 and product_id = 126;
Thanks Sunny for the reply.
the year feild is in the calender table which is being loaded late based on a order_date.
in the source table there is the product_id and order_id.
How do i do this?
Hi
Then try like this
Load * from yourtablename where Year(order_date) < 2016 and product_id = 126;
Thanks Mayil.
Can i also do it in the straight table?
Or this:
LOAD *
FROM Source
Where not (Product_id = 126 and Year(order_date) = 2016);
Thanks sunny for your help as always.
But can we also put this condition on in the expression in the straight table??
Hello Sunny,
Can i use the below expression.?
how do i include Year=2016 in the below expression?
aggr(if(match(product_id,'126')=0, product_id),product_id)
Appreciate your help.
Regards,
Jaya
You can. May be like this in your expression
RangeSum(Sum({<Product_id -= {126}>}Measure), Sum({<Product_id = {126}, Year = {'<2016'}>} Measure))