Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am replacing chart expression
Count(DISTINCT if(Hours>0 AND Job <>1 AND NOT match(PersonID,1,2,20,21,22,23,24,25,26,27,28,29,998,999),Person_Name))
by set analysis.... how to add NOT MATCH condition in set analysis expression. Ia m trying something like this
=count({$<PaidDate=P(Date), Hours={'>0'}, Job={'<>1'}, PersonID{'<>{1,2,20,21,22,23,24,25,26,27,28,29,998,999}'} >} DISTINCT Person_Name)
And also like this
=count({$<PaidDate=P(Date), Hours={'>0'}, Job={'<>1'},PersonID={'=NOT MATCH(PersonID,1,2,20,21,22,23,24,25,26,27,28,29,998,999)'} >} DISTINCT Person_Name)
Thanks in Advance
Use the exclusion operator: FIELD -= {VALUES}
So:
..., PersonID-={1,2,20,21,22,23,24,25,26,27,28,29,998,999}>} ...
Person ID does not equal any of those values.
try this
=count({$<PaidDate=P(Date), Hours={'>0'}, Job-={'1'}, PersonID-={1,2,20,21,22,23,24,25,26,27,28,29,998,999} >} DISTINCT Person_Name)
to exclude son values con the set analysis you have to use PersonID - = {-={1,2,20,21,22,23,24,25,26,27,28,29,998,999}
Regards
Nope its not working... and also what about remaining conditions in my expression.... are they correct?
What results are you getting? All nulls? All nulls suggests a syntax error:
Here's a full expression:
Count({<Hours={'>0'}, Job-={1},
PersonID-={'1,2,20,21,22,23,24,25,26,27,28,29,998,999'}>} DISTINCT Person_Name)
Not Nulls... in correct data.... I am testing it with comparing old expr's data ....
I should get something like 81, 91..... and the total is 157.... But its 157 in all rows...
Can you provide a sample? When you're getting nulls, it's usually a syntax error that can be fixed. If you're getting incorrect data, then it's hard to troubleshoot without seeing the data. Do you have null values in any of the fields using Set Analysis?
The 157 in all rows sounds odd, since you don't have a total in there. What is the exact expression you are using?
I would try to look at the data on a more detailed level. Look at specific examples and see which ones are counted by the new expression that weren't counted by the first. Putting Person_Name temporarily into your table as a dimension should help with that.
I have attached sample QV file..
It's not 157 in all rows on my machine (v9SR6). I didn't carefully check every row, but both charts appear to have the same results.