Forum Discussion

Kareus's avatar
Kareus
Helper I
5 years ago
Solved

Formula Help

How can I determine if all the rows that share a particular order # have inventory to ship Order #400001 complete.   Report Date Order # Scheduled Date Description Inventory Items Needed I...
  • mahoneypat's avatar
    5 years ago

    Here is a column you can put on your orders table to indicate if there is sufficient inventory for each item.  It also works as a measure expression that will work in a table visual with the Order # column.

     

    Enough =
    IF (
        ISBLANK (
            CALCULATE (
                COUNT ( Orders[Order #] ),
                FILTER (
                    ALLEXCEPT (
                        Orders,
                        Orders[Order #]
                    ),
                    Orders[Inventory] < Orders[Items Needed]
                )
            )
        ),
        "Y",
        "N"
    )

     

    Regards,

    Pat