Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
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.
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?
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
@shasha3006 Could you please post us some sample data?
can you post a snapshot of your datamodel ?