# Analysis for Out of stock Kanban cards

Hello,

I have created a kanban for material replenishment.
As you can see there are 2 kanban cards for each part number, one with a trigger of half total stock, and another one for if stock reaches zero.

A helpful KPI is to know the number of parts that are out of stock. However, if I set a simple analysis that works out Qty of cards where Empty=Yes and trigger =0, if the first card (trigger at half total stock) is replenished, it will be showing as Out of stock.

Any ideas for this?

I guess what I am after is a way of telling how many different parts have BOTH Kanban’s empty.

Hey Nolsie,

I think I solved this one. This explanation is a little long winded, so if you get lost at any point let me know and I will provide a little more detail. This is little bit of a tricky thing to do-

Here is my example table

In this case we would expect item A and B to trigger as needing replenishment.

Create an analytic

1. Create a new trigger from your desired dashboard.

2. Select the table tab in the top left

4. Click Create analysis

5. Select “Single Number”

6. Click Change under the number section on the left.

7. Select “Count where True”

8. Click “Aggregate Functions”

9. Click “Count Where True”

10. Click on “Select a variable or function”

11. Seach for the “and” function, select it.

You now have the ability to count records with two filters. We want to filter to just second cards and cards that are empty

12. For the first filter select “Table fields”, the select “Table ID”

13. Click “Equals” and change it to “Contains”, Enter (2) in the string value field.

Now we are filtering the records down to just the second bins (thats id’s contain ‘(2)’)

14. For the second filter in the and function, Click “Select a variable or function”

15. Select Table field

16. Select “Empty”

So now we are counting the records where the ID contains (2) and Where the empty field is true.

Does this make sense?
Did you get lost anywhere along the way?

Pete