Filter with respect to Category Counts

Started by Darius1968, September 07, 2016, 01:00:54 PM

Previous topic - Next topic

Darius1968

I know that the category view gives the "real" count for the files in that category.  Is it possible to apply a filter that would to me which categories have say, 5 or 12 files, without my having to look through each category in the tree? 

Mario

There is no filter that allows you to filter for categories with a specific number of files (or a range). I don't think there would be wide-spread need for such a thing.

The Data Map app in the App Panel has a useful preset which shows you the 50 largest categories.

If you only need this occasionally (and don't mind the somewhat slow performance) you could create a data-driven category based on the category variable.

For example:

{File.Categories|count:true}

or

{File.Categories.Direct|count:true}

should do the trick. This should give you a data-driven category with a child category for each unique number of categories a file is in or is assigned to.
If you see a child category with the name "6" for example, it contains all files with 6 categories assigned (+1 for the data-driven category).

Producing this category can some time even on a fast PC. You should set it to manual update and only refresh it when needed.
Where there is IMatch, there is a way.

-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Darius1968

I don't need to have each and every category tree in my database be considered.  If I have a data driven category or even a normal category, isn't there a way that I can somehow filter that category such that it enumerates only the branches for which there is a specific # of images or numeric range? 

Mario

No.  There is no filter which looks at the number of images assigned to a category.

But you can use filters for the data-driven category, limit it to numeric ranges etc.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Darius1968

How could I use the filters that limit the category to within a numeric range  of say, 3-6, to show me which nodes have 5 images assigned? 

Mario

If you want the data-driven category to show only categories with counts between 4 and 6,

1. Set the Data type of the category to Integer
2. Enter the numeric range 4,6
3. Disable Other.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook