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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.

Top Solution Authors