Counting Specific Values in Data Store: A Guide for Make.com Users

Have you ever found yourself in a situation where you need to count items with specific values in a data store? You're not alone. This is a common challenge that many Make.com users face. In this article, we'll walk you through a step-by-step solution to this problem.

The Problem

Let's say you have a data store that looks something like this:

[Insert screenshot of data store here]

You want to count how many times an item of "Klasse_ID” is stored in the data store. For example, if you're looking at the screenshot above, you might want to return a value of "2” for the item "505” of "Klasse_ID”.

You've tried a lot of variations of data store triggers (search, count) and aggregators, but nothing has returned the value you're searching for.

The Solution

Unfortunately, there is no direct option to count the specific values from the data store. But don't worry, there's a workaround. You can achieve this by listing all the records in your data store, turning them into an array, and using a combination of functions to modify the output so it returns (counts) only the requested values.

Here's how you can do it:

  1. Aggregate all records into an array.
  2. Iterate and deduplicate the array of IDs (Klasse_ID). This way, only unique IDs will be output.
  3. Set multiple variables - ID (Klasse_ID) from the iterator and the number of occurrences (count) in the original array from the first aggregator (=in the data store) using the set of functions with the use of the iterated IDs and date (Angesehen am) below.
  4. Finally, you can aggregate them to get a new array of IDs and their count you can use anywhere further in the scenario flow.

Troubleshooting Tips

If you're still having trouble, make sure you're using the correct functions and aggregators. The Make.com help center has great resources on general functions, math functions, and array functions that can help you understand how to use them more effectively.

Conclusion

Counting items with specific values in a data store might seem challenging at first, but with the right approach, it's definitely doable. Remember, the key is to aggregate all records into an array and use the right functions to count the specific values. We hope this guide has been helpful. Happy Making!

You do have further questions?

Ask your question via E-Mail: Richard@make-app.de
Book a paid Support & Consulting Session
New Make.com user? Sign up through this Affiliate Link to receive 10.000 operations for FREE.