In Views 3 I have a USER type of view. I have an exposed filter for a specific vocabularies terms used as a term referance in the main profile. So, these terms are related to users. When a user searches for other users associated with these terms, it outputs individual users multiple times. How can I reduce the User duplcates?

Comments

kingandy’s picture

I know there used to be a "remove duplicates" or "select DISTINCT" type option, but I can't find it looking around current Views.

Have you tried the "Grouping Field" settings in the Format Settings dialogue? It should be possible to use that to "group by" one of the fields in your view (eg, "group by UID", so it only displays one row per UID). You may also need to set "Use grouping" under Advanced Settings to Yes.

++Andy

IWasBornToWin’s picture

Distinct is in query settings, lower right side of views

naga_karthick’s picture

I am using drupal 7. My view contains the fields of taxonomy terms and blog posted user. If multiple user post blogs and choosing the same taxonomy term it shows all the user. I am in need of showing the latest user who post the blog and using the same taxonomy term, it need not to show all the users choosing the same taxonomy term.

Distinct option and reduce duplicates are not working, please provide solution.
Thanks in advance.

Swift Arrow’s picture

Hey, I have the same problem... have you found any solution?

Thanks!

etrometer’s picture

The distinct setting does not have any effect in removing duplicates from my list of link fields within my view. Is this a bug? I have searched google and found numerous people with the same problem.
Thanks in advance
Eric

errand’s picture

subscrubing.
simple tags make view huge an ugly (

ItangSanjana’s picture

No, no distinct.
Under the Advanced tab, edit Use aggregation to yes.
Under the Fields tab, edit aggregation setting of a field e.g. User:uid to Count.
Enjoy ..

fureigh’s picture

Thanks, iS! This worked for me.

miromarchi’s picture

What if the view shows content types (with a particular view mode), not fields?
Aggregation only work with fields.
DISTINCT is not resolving.
Reduce duplicates in exposed filter settings, is not resolving.

My view QUERY is like this:

SELECT DISTINCT node.type AS node_type, node.title AS node_title, field_data_field_com_categories.field_com_categories_tid AS field_data_field_com_categories_field_com_categories_tid, node.nid AS nid
FROM 
{node} node
LEFT JOIN {field_data_field_com_categories} field_data_field_com_categories ON node.nid = field_data_field_com_categories.entity_id AND (field_data_field_com_categories.entity_type = 'node' AND field_data_field_com_categories.deleted = '0')
WHERE (( (node.type IN  ('event', 'org', 'project')) AND (node.status = '1') AND (node.type IN  ('event', 'org', 'project')) ))
ORDER BY node_type ASC, node_title ASC, field_data_field_com_categories_field_com_categories_tid ASC
LIMIT 20 OFFSET 0

I have a view displaying a grid of contents of three different types, with a bunch of exposed filters and a bunch of esposed sorts. No relationships.
How can I eliminate duplicates?

Miro Marchi

wilhelmmass’s picture

Did you found a solution?