Need Distinct Count value

0
Hi,    Here in DB I have some data and I need the total count value with removing the duplicates.  for eg; I have list (A,B,A,C,D,B) and the total count must be 4 not 6. So how to get this distinct count  value.
asked
4 answers
1

If you can retrieve the data directly from the database, it will only retrieve unique objects. There are some performance benefits when you retrieve a list of objects and use it for an aggregate action only, the aggregate action should be placed directly behind the retrieve action.

 

In the case you cannot retrieve the list directly from the database, you can use the union list operation to remove any duplicates. Use the list variable for both parameters.

answered
0

Thank you for your reply. I used it but getting zero value. Is there any mistake that I have done.

Please find below below image for your reference.

answered
0

Hi, chandra shekar,

 

You can use OQL Statement. It is quicker.

Documentation : 

https://docs.mendix.com/refguide/oql


Demo app where you can play with the Queries.

https://mydemoversion8-sandbox.mxapps.io/p/OQL

You have a module for OQL: https://marketplace.mendix.com/link/component/66876

 

answered
0

While the OQL module is the most optimized because it avoids the loading of objects, this module is easier to use but expects the list as input. 

Count Values Of Member : 

https://marketplace.mendix.com/link/component/121239

 

 

answered