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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
krengan21
Creator
Creator

Calculation based on customer id

How to get the actual value from the cummulative value in talend ? for example On a paricular a car runs for 1000 kms next day the car will start from 1001 kms ,So what i need is how to calculate the total kms covered on a particular day
1000kms on 27-10-2017 2000kms on 28-10-2017
so the total kms covered on 28-10-2017 is 1000kms how to do that in talend for which i need to update around 1 lakh history records using the above method and this needs to be done in mongodb
And there are two customers with customer id 1&2
For 2017-11-27
1 has 1000
2 has 2000
For 2017-11-28
1 has 2000
2 has 3000
How to subtract cummlative values based on the customer id so that on
2017-11-28 I will get
1 has 1000
2 has 1000
Thanks
Labels (2)
14 Replies
Anonymous
Not applicable

This doesn't really help. I cannot see the complete expressions and I cannot see what is wrong with the data. I *might* be able to figure something out if I could see the source data and how it is returned, but at the moment I do not even understand what the problem is.

krengan21
Creator
Creator
Author

1. Customer_id changed ==Var.lastCustomerID==null || Var.lastCustomerID! --->customerid_changed

 

2.row2.customer_id --> lastCustomerID

 

3.Var.customerid_changed ? row2.f1_water_pump : row2.f1_water_pump - Var.last_water_produced  --> var1

 

4.row2.f1_water_pump -->last_water_produced

 

Please find the attachment for the screenshots for your reference


sortrow_properties.png
job screenshot.png
Anonymous
Not applicable

These expressions look wrong. For example,

 

Customer_id changed ==Var.lastCustomerID==null || Var.lastCustomerID! --->customerid_changed

....will not even compile. 

 

Either you have not copied exactly what I supplied or a copy an paste error has occurred here.

 

Can you double check what you have sent here please?

 

 

 

krengan21
Creator
Creator
Author

 Var.lastCustomerID==null || Var.lastCustomerID!=row2.customerId -->customerid_changed sorry i have pasted here wrongly

Anonymous
Not applicable

OK. They look OK. 

 

I need to see the data that fails. What goes in and what goes out?