Forum Discussion
Count with All filter
- 7 years ago
Hi Anonymous,
Try this one please.
Measure = VAR existedBefore5 = CALCULATETABLE ( VALUES ( Table1[Part] ), FILTER ( ALL ( Table1 ), Table1[Added_Date] <= TODAY () - 5 ) ) VAR amount = CALCULATE ( COUNT ( Table1[Part] ), FILTER ( 'Table1', NOT Table1[Part] IN existedBefore5 ) ) RETURN IF ( ISBLANK ( amount ), BLANK (), IF ( amount <= 5, amount, 9999 ) ) //9999 could be 0 or blank()If it works, please mark it as an answer.
Best Regards,
Dale
Hi Anonymous,
We need to find out these part that exists 5 days ago first. Please try this formula.
Measure =
VAR existedBefore5 =
CALCULATETABLE (
VALUES ( Table1[Part] ),
FILTER ( ALL ( Table1 ), Table1[Added_Date] <= TODAY () - 5 )
)
RETURN
CALCULATE (
COUNT ( Table1[Part] ),
FILTER ( 'Table1', NOT Table1[Part] IN existedBefore5 )
)
Best Regards,
Dale
- Anonymous8 years agoNot applicable
Thanks for the help. I might of explained this incorrectly.
First, I want to see whenever we enter a part for the first time. This is the most important.
Second, I don't want to see a part that was entered for the first time a year ago. I want to narrow down what is being displayed to just recent activity. If we enter a part for the first time within the last 5 days of business, I have time to react and monitor it through the shop.
The only importance to the "last 5 days" is that it is recent activity and that's what I want to display.
Is that what your measure will display? I'm trying to figure it out.
- v-jiascu-msft8 years ago
Microsoft Employee
Hi Anonymous,
Can you share a dummy sample?
Best Regards,
Dale
- Anonymous8 years agoNot applicableYes I can. I can supply it tomorrow morning when I get back in the office. Thank you for your help.