
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
count distinct with multiple criteria
hi good people,
want to asking,
i have count distinct with multiple criteria
but, the result just count distinct without criteria
ex.
vehicle status
bicycle new
bicycle old
car new
car new
I want to count distinct person have vehicles ,like :
car new =2
my script is :
Count(distinct{< vehicle={"car"},status={"NEW"}>} person)
but the result just : 4
😞
I appreciate any help
shasha

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @shasha3006
How is it your model?
The table containing person is associated with table containing vehicle and status ?
If you have blank / null values for this filtering for all persons, it will bed counted also.
[],
Pedro

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If the tables containing all the fields are linked then this should work
Count({< vehicle={'car'},status={'new'}>} distinct person)
Also,
you can check by putting the values in a table and clicking on the filter values corresponding to the vehicle and status and then check if the values are coming out to be same or not.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi perdro,
for status,i have calculate with fx if
if(Sum(gross)/COUNT(DISTINCT trdate)>=SUM(DISTINCT target),'new','old')
Does it affect the trdate?
while we look for it based on the period?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi deepan,
for status,i have calculate with fx if
if(Sum(gross)/COUNT(DISTINCT trdate)>=SUM(DISTINCT target),'new','old')
Does it affect the trdate?
while we look for it based on the period

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@shasha3006 Could you please post us some sample data?


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
can you post a snapshot of your datamodel ?
If a post helps to resolve your issue, please accept it as a Solution.
