Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am looking to create a bar graph and KPIs that return a count of work orders that were completed incorrectly.
An "incorrect" work order would be one where the non-bulk materials are missing data in the "Removed Quantity" field. The non-bulk materials are those with no data in the Bulk Material field. There may be several materials listed on a single work order, but if any one of the non-bulk materials are missing data in that field, then I would want that to count as an incorrect work order. The correct work orders would have data in the Removed Quantity field for all of the non-bulk items associated with that work order.
For example, the rows highlighted in blue in the attached sample data would count as one incorrect work order since one of the non-bulk materials is missing data entry in the removed quantity field.
What script can I use to get a count of incorrect work orders by Main Workctr?
In your load script you could use the len() function to check if the length of the data in the field is greater than zero if so then set a flag of say Correct, otherwise Incorrect.
try this in your KPI..
if(len(Trim([Bulk Material]))=0 or len(Trim([Bulk Material]))=0,count(Order))
May be this
count({$-<[Bulk Material]={"*"}>*$-<[Removed Qty]={"*"}>}[Main workctr])