Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
iahmadmca
Contributor
Contributor

Need to display the order id and quantity based on script logic.

Hi Team,

I have one requirement which i need to get the result based on script level. Provided the below requirement details.

I am using the below  script logic to get it done but it is not coming.

Order:
LOAD [Order id],
Quantity,
Order_Date
FROM
[C:\Users\Irshad .Ansari\Desktop\Daily work activity.xlsx]
(ooxml, embedded labels, table is Sheet2)

where [Order id]<>1 or Order_Date<>null() and Order_Date<> Previous(Order_Date);

Note: one order_id should be one quantity and quantity Order date should be first inter value it should not be change.

sample data.

Order idQuantityOrder_Date

1

2------
13------
141-jun-2019
161-Jun-2019
271-Aug-2019
39------

 

Based on the sample data the result should be like this:

Order idQuantityOrder_Date

1

41-jun-2019
471-Aug-2019
39--------

 

I would like to request you to please provide the solution.

Thanks in advanced.

Regards,

Irshad Ahmad

Labels (1)
3 Replies
Claudiu_Anghelescu
Specialist
Specialist

where ( [Order id]<>1 or Order_Date<>null() ) and Order_Date<> Previous(Order_Date);

 

or

 

where [Order id]<>1 or ( Order_Date<>null() and Order_Date<> Previous(Order_Date) );

To help community find solutions, please don't forget to mark as correct.
iahmadmca
Contributor
Contributor
Author

Thank for the reply.

Could you please provide any other alternate solution for this.

iahmadmca
Contributor
Contributor
Author

Hi 

This logic is working fine, but when I am changing the quantity for existing Id its getting reflect on that. The quantity should not be changed. It should  be first entered in quantity.