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

Count if result incorrect after a selection

Hello,

I am doing some test in this sample data :

Machine_IDDateNum_Incident
12016101452400
12016101452406
12016101452000
12016101452447
12016101452451
12016101452452
12016101452496
12017101452000
12017101452591
12017101452597
12018101452601
12018101452614
12019101452621
22017101452000
22017101452682
22017101452690
22017101452829
22017101452835
22017101452842
22017101452843
22018101452000
22018101452907
22019101452911
22019101452915
22019101452916
22019101452918
22019101452000
22019101452922
22019101452923
22019101452924
22019101452928
32018101452940
32018101452941
32018101452944
32018101452000
32018101452961
32018101453035
32018101453000
32018101453042
32019101453048

 

I am trying to do a count distinct Num_Incident if Num_Incident finish with a triple 0. I have used with the formula : Count(distinct {<Num_Incident={"*000"}>} Num_Incident). The formula return the total value of 2 which is the correct answer (match the Num_Incident of 101452000 and 101453000).

But here is the issue, when I filter in a selection box Num_Incident with whatever value, the count distinct still return 2. If I select for example Num_Incident = 101453042, I still get value 2 while I am supposed to get no value.

Can anyone know a solution for this, please ?

Best regards,

Clément Boyer

Labels (2)
1 Solution

Accepted Solutions
sunny_talwar

Try this expression... added * before the equal sign within the set analysis....

Count(DISTINCT {<Num_Incident *= {"*000"}>} Num_Incident)

 

View solution in original post

2 Replies
sunny_talwar

Try this expression... added * before the equal sign within the set analysis....

Count(DISTINCT {<Num_Incident *= {"*000"}>} Num_Incident)

 

ClementByr
Contributor III
Contributor III
Author

It works perfectly, thank you.