help with expression (count if date exists in selected year
Hello please help with my issue.
In my data for each id, there is a field "year", a date field and a result field. In script I precalculated "last result" field.
My expression is : count({< [last result]={'no'}>} distinct id)
Thing is, I made a master calendar also ,so there is another year field i call it "year of result".
Each id can have many dates, many results, many assigned years "year" other that "year of result".
So this expression gives me for "year of result"=2021 the id's that have ever had a negative result. The problem is for 2021 i don't have negative results, so it should return 0. For "year"=2021 i indeed get 0 results.
Please I need your help, tell me if you don;t understand something, it is mportant for me to find a solution.
How can i write the expression so that if "year of result" exists then count distinct ids, else give 0?