Count the number of instance of 50% and 60% for each unit. If the unit appeared twice..

I need help with the following. I want to count the number of instance of 50% and 60% for each unit. If the unit appeared twice, count only the most recent value based on the date.
The formula will be on the sheet summary, and I entered the expected result.
...
Answers
-
Hi @heyjay
This is fairly simple
- Create a Auto Number column and name it "Auto". Set the starting number to 1, no prefix.
- Create a text column and name it Instance. Insert below formula in the column. It will give a serial number to each repeated instance of _Unit.
=COUNTIFS([_Unit]:[_Unit], @cell = [_Unit]@row, Auto:Auto, @cell <= Auto@row)
- Create a text column and name it LastInstance. Insert below formula in the column. It will identify if the Instance is the last Instance for the specific _Unit.
=IF(Instance@row = MAX(COLLECT(Instance:Instance, [_Unit]:[_Unit], [_Unit]@row)), "Yes", "No")
- Finally, use this formula in the summary field for calculating the number of items in _Unit which as 50% as the last value (towards bottom).
=COUNTIFS(LastInstance:LastInstance, "Yes", [%]:[%], 0.5)
Ensure that the % column is formatted as percentage. If it is not percentage. you need to change 0.5. Use 0.6 in the summary field for counting _Units with 60% as the latest % value.
Best Regards
Amit Wadhwani, Smartsheet Community Champion
Smartsheet CoE, Ignatiuz, Inc., Exton, PA
Did this answer help you? Show some love by marking this answer as "Insightful 💡" or "Awesome ❤️" and "Vote Up ⬆️"https://www.linkedin.com/in/amitinddr/
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 67.1K Get Help
- 449 Global Discussions
- 154 Industry Talk
- 504 Announcements
- 5.4K Ideas & Feature Requests
- 85 Brandfolder
- 156 Just for fun
- 80 Community Job Board
- 513 Show & Tell
- 34 Member Spotlight
- 2 SmartStories
- 308 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!