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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
markblom
Frequent Visitor

List parts with number of days with no stock?

Hi!

 

I am looking for a way to count the number of days in a period where a part has had no stock.

 

Below you will find a short summary of the related tables:

 

Parts:

Partnumber

Description 

 

Stock:

Stockdate

Partnumber

Quantity

 

Date:

Date

 

If a part has had no stock on a certain date there will be no record in the Stock table for that combination of Partnumber and Stockdate.

 

I would like to create a visual based on a table with all parts and in a column I would like to show the number of days in that period where there was no stock for that part. What would be the best way to do so?

 

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@markblom 

Add the Part Number from the PArts table and the following measure to table visual:

Days Without Parts = COUNTROWS (Dates) - COUNTROWS (Stock)

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

2 REPLIES 2
Fowmy
Super User
Super User

@markblom 

Add the Part Number from the PArts table and the following measure to table visual:

Days Without Parts = COUNTROWS (Dates) - COUNTROWS (Stock)

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

I am struggling with my account to this community so this reply comes from a different user.

 

Anyway: thanks for the solution!

 

Mark

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.