New parts added

I have a table that contains Part Number, Added_date. This table goes back to 2002. Here is what I need to know.

First, I need to know whenever we enter a Part Number into our system(table) that has only been in our shop less than or equal to 5 times.

Second, I want to narrow that result down to just activity in the past 5 days. If 6 days ago, we entered a part for the fourth time since 2002, I don’t want to see it in my results. If we enter a part for the second time since 2002 three days ago, I want to see it.

I did this:

Count Part End As =

Then I put a visual relative filter on the Added_dte “is less than 6”. That seems to work if I am only displaying the Part_Ended_As and “Count Part End As” measure in the table visual but when I added another column, the work order number, the results became incorrect. What am I doing wrong or is there a better way to get this information?

I think here you want to use a combination of CALCULATE & FILTER.

The logic, to me, seems to sounds like this.

On any day you want to look back and see has any particular part had a sale (or similar calc) less than 4 times before. Then you want to see if this can be filter to just the last 5 days also.

I’m still not 100% sure how you want to show this in your report so I can only guess at the context.

Let’s start with the outline for the countback calculation.

As I mentioned I can only guess the context is products here.

So you should be able to simply go

Products Purchased = COUNTROWS( Sales )

This technique will get you the total number, then you can use a simple IF statement.

Products Purchased = IF( COUNTROWS( Sales ) > 150, BLANK(), COUNTROWS( Sales ) )

This will reduce the size of the table showing the results

For example


To then drill down the time frame,

You can do this with a simple CALCULATE function and include the

Product Pruchased Time Intelligence = 
CALCULATE( [Products Purchased],
    DATESBETWEEN( Dates[Date], Date1, Date2 ) )

See how you go with these ideas.

1 Like