Forum Discussion

Matt_JEM's avatar
Matt_JEM
Helper I
1 year ago
Solved

Warehouse Qty

Good Day All.

 

I need help with the following please. I thank you in advance for your help and assistance.

 

I have ave build I slicer that list the warehouses. What I want to achieve is that when I select a warehouse it must show me the quantity of the stockcode in the warehouse. I am not interisted in the 0 values.

 

I have used  WarehouseQTY = Maxx('InvWarehouse', 'InvWarehouse'[QtyOnHand]). 

With the above code I see 976 pcs of F00061-RAP001-A01-L00-T00 in JEMP02 and JEMR02 and JEMP09 does not list the 4 pcs at all. How do I fix this? 

 

StockCodeWarehouseQtyOnHandDateLastStockMove
F00061-RAP001-A01-L00-T07JEMP02128 Oct 2024 00:00:00
F00061-RAP001-A01-L00-T00JEMR022912 Nov 2024 00:00:00
F00061-RAP001-A01-L00-T00JEMP09401 Nov 2024 00:00:00
F00061-RAP001-A01-L00-T00JEMP0297612 Nov 2024 00:00:00
F00061-RAP001-A01-L00-T07JEMR01023 Oct 2024 00:00:00
F00061-RAP001-A01-L00-T00JEMR01023 Oct 2024 00:00:00
F00061-RAP001-A01-L00-T07JEMK04028 Oct 2024 00:00:00
F00061-RAP001-A01-L00-T07JEMK02028 Oct 2024 00:00:00
F00061-RAP001-A01-L00-T07JEMK01025 Oct 2024 00:00:00
F00061-RAP001-A01-L00-T00JEMK04028 Oct 2024 00:00:00
F00061-RAP001-A01-L00-T00JEMK02028 Oct 2024 00:00:00
F00061-RAP001-A01-L00-T00JEMK01025 Oct 2024 00:00:00

9 Replies

  • try this:

     

     WarehouseQTY =
    SUMX(
    FILTER(
    'InvWarehouse',
    'InvWarehouse'[QtyOnHand] > 0
    ),
    'InvWarehouse'[QtyOnHand]
    )

    • Matt_JEM's avatar
      Matt_JEM
      Helper I

      Shravan133 

       

      This adds all the values together and show 1009 pcs in warehouse JEMP09 and 1009 pcs in warehouse JEMR02. and 0 pcs in warehouse JEMP09

  • Hi,

    Based on the data that you have shared, show the expected result very clearly.

    • Matt_JEM's avatar
      Matt_JEM
      Helper I

      Ashish_Mathur 

       

      What I expect to see when I select Warehouse JEMP02 is the F00061-RAP001-A01-L00-T00 = 976 and when I select JEMP09 F00061-RAP001-A01-L00-T00 = 4 and when I select JEMR02 F00061-RAP001-A01-L00-T00 = 29

      I hope this helps. 

  • Matt_JEM 

    updated measure:

    WarehouseQTY =
    CALCULATE(
    SUM('InvWarehouse'[QtyOnHand]),
    'InvWarehouse'[QtyOnHand] > 0
    )

    Add a slicer visual for Warehouse.
    Use this measure in a table or card visual to display the WarehouseQTY.

     

    💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
    Cheers,
    Kedar
    Connect on LinkedIn

    • Matt_JEM's avatar
      Matt_JEM
      Helper I

      Kedar_Pande 

       

      Thnak you for your reply. With the code you provided ,this is the result that I get for JEMP02

      and this is the result for JEMR02


       

      and there is no record of F0061-RAP-A01-L00-T00 in warehouse JEMP09

       

      I thank you in advance for you assistance.

       

  • hI Matt_JEM ,

     

    Please try the bellow measure:

    WarehouseQTY = 
    SUMX(
        FILTER(
            'InvWarehouse',
            'InvWarehouse'[QtyOnHand] > 0
        ),
        'InvWarehouse'[QtyOnHand]
    )

     

    Please let me know if it working.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Matt_JEM ,

     

    Pls has your problem been solved? If so, accept the reply as a solution. This will make it easier for the future people to find the answer quickly.

    If not, please provide a more detailed description, preferably some virtual sample data, and the expected results.

     

    Best Regards,

    Stephen Tao