Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everyone,
i have two data sources.
The first one contains our company's total output. Each Product is saved in it's own row. Columns are date, serial number and product type.
The second source contains all defective products. Also with one row per product and the columns date, serial number and product type.
Goal is the creation of a graphic, which shows the percentage of errors over the time.
So far no challenge. Unfortunately the total output data is being created automatically. The Error list is being created manually with delay.
To be sure of having a representative error rate, only values with the same max date may by considered.
Can you propose any solution?
Thanks in advance!
Or if you want to filter on Max Date already when the script runs:
Defective:
Load
Date,
SerialNumber,
ProductType
from Defective ... ;
MinMaxDate:
Load Min(Date) as MinDate, Max(Date) as MaxDate resident Defective ;
Let vMinDate = num(floor(peek('MinDate', -1, 'MinMaxDate')));
Let vMaxDate = num(floor(peek('MaxDate', -1, 'MinMaxDate')));
Drop Table MinMaxDate;
Total:
Load
Date,
SerialNumber,
ProductType
from Total (txt)
where Date >= $(vMinDate) and Date <= $(vMaxDate) ;
Hi,
I'd generate the source data with a timestamp for each new row. Put the timestamp dates in a list box, so that the user can filter on last date. You might also use an input box with a variable vMaxDate.
You can also use set analysis to solve this issue. In general, the solution will depend on flagging (timestamp) the source data in both sources.
Maybe, this general description gives you an idea?
Rgds,
sebablum
Or if you want to filter on Max Date already when the script runs:
Defective:
Load
Date,
SerialNumber,
ProductType
from Defective ... ;
MinMaxDate:
Load Min(Date) as MinDate, Max(Date) as MaxDate resident Defective ;
Let vMinDate = num(floor(peek('MinDate', -1, 'MinMaxDate')));
Let vMaxDate = num(floor(peek('MaxDate', -1, 'MinMaxDate')));
Drop Table MinMaxDate;
Total:
Load
Date,
SerialNumber,
ProductType
from Total (txt)
where Date >= $(vMinDate) and Date <= $(vMaxDate) ;
Thanks Henric, this is the kind of solution i was looking for!