Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a case like this.
Dataset contains a work order WO_ID, it is unique and contains a number of deadlines WO_DL (date) in a product sequences. The number WO_ID is extreamly large, belong to different product groups and may inter connect in some way, such as a group WO_DL can only start if another WO_DL should be finished first, if it is delayed, the following WO_ID planned the deadline has to be reschadued, and the entire production process affected.
The WO_DL (for example at a perticular point), such as half-time in the production process (WO_DL50 predifined), but it can change from day to day, for many reasons, such as a parts delay, changes in the market, as well as empolyees situation such as disease, strick, etc. Dataset is created (CreatDay) daily as a snapshot from a large and complex DW.
As a manager I am interested in how mang total WO_ID having such a deadline changed, such as last Monday vs Monday before (the default), or months wise, or today vs yesterday or strik day end vs the day start to strik (be flexible), ... ie RefDay vs RefToDay.
solution.
I download all the snapshots entire dateset in my app day after day, and every by CreatDay repeated for all WO_ID and its WO_DL50,
Inside the app I use set analysis:
Count({$ <Group = { 'G1'}, CreatDay = { '$ (vRefDay)'}>} WO_ID)
// count the number WO_ID on RefDay dataset for the Group1.
I'm more interested in those WO_ID on the RefDay with the WO_DL50 deadline changed comparing to RefToDay, i.e.:
DiffDay = ((only (CreatDay = { '$ (vRefDay )} WO_DL50) - only (CreatDay = {' $ (vRefToDay )} WO_DL50)) - = 0;
// looks at those on selected dates and deadlines are not equal.
I want to combine the Count and calculate a set expression analysis, but I failed:
Count({$ <DiffDay-={0}, CreatDay= { '$ (vRefDay)'}>} WO_ID)
What is the right solution?
Try this?
Count({$ <DiffDay={"=((only (CreatDay = { '$ (vRefDay )} WO_DL50) - only (CreatDay = {' $ (vRefToDay )} WO_DL50))<>0"}, CreatDay= { '$ (vRefDay)'}>} WO_ID)
Or
Count({$ <DiffDay={"=($ (vRefDay )-$ (vRefToDay))<>0"}, CreatDay= { '$ (vRefDay)'}>} WO_ID)