Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
jaarroyl
Contributor III
Contributor III

How to Count and Group By

Hello World!

Please I need help to get the number of valid products (State) that a customer has on the company and group by ID

I have this table

ID -  PRODUCTS ID - STATE

15363 - VEHICLE - VALID

15363 - MOTO - INVALID

15363 - VEHICLE 2 - VALID

14321 - VEHICLE - INVALID

14321 - VEHICLE 2 - VALID

I need to get this

ID - NUMBER OF PRODUCT VALID

15363 - 2

14321 - 1

Thanks

14 Replies
sunny_talwar

Try this

Count(TOTAL <ID> {<STATE = {'VALID'}>} ID) * Avg(1)

jaarroyl
Contributor III
Contributor III
Author

It didnt work.

The same before.

sunny_talwar

It seems to be working for me...

Without selection

Capture.PNG

INVALID Selected

Capture.PNG

VALID Selected

Capture.PNG

jaarroyl
Contributor III
Contributor III
Author

It Works, you rigth. Thanks you

sunny_talwar

okay nice