Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Matt_JEM
Helper I
Helper I

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
1 ACCEPTED SOLUTION

PBI file attached.

Hope this helps.

Ashish_Mathur_0-1732003579937.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

9 REPLIES 9
v-stephen-msft
Community Support
Community Support

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

 

Bibiano_Geraldo
Community Champion
Community Champion

hI @Matt_JEM ,

 

Please try the bellow measure:

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

 

Please let me know if it working.

I hope this helps! 
If you found this answer helpful:
✔️ Mark it as the solution to help others find it faster.
 Give it a like to show your appreciation!

Thank you for contributing to our amazing Power BI community! 
Kedar_Pande
Community Champion
Community Champion

@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

@Kedar_Pande 

 

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

Matt_JEM_0-1731992488824.png

and this is the result for JEMR02


Matt_JEM_1-1731992547520.png

 

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

 

I thank you in advance for you assistance.

 

Ashish_Mathur
Super User
Super User

Hi,

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


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

@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. 

PBI file attached.

Hope this helps.

Ashish_Mathur_0-1732003579937.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Shravan133
Solution Sage
Solution Sage

try this:

 

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

@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

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.