Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey all,
Just a simple question but I can't get it working. I have a table with the columns "Employee ID", "Date" and "Flag Leave". The flag is a 1 or 0 and tells if someone was leaving in a period or not. I want to count all the days of an employee in a selected period if one or more days in the selection are flagged.
This should be done in the frontend and not in the script editor because the selection of periods is flexible. I have tried AGGR but it's a dataset with 6000 employees and about 900 dates per employee so it was to performance heavy but maybe I did something inefficient.
Have anyone an idea how to solve this?
Thanks in advance
Try with p(). Something like:
Count({$<Employee=p({<Flag={1}>} Employee)>}Date)
Please try something like:
Count({$<Flag={1}>}Date)
Hi Jochem, thanks for taking time. This will not work because I want to count all the days of en employee if one (or more) is flagged. With the expression you give, only the flagged days itself will be count.
Try with p(). Something like:
Count({$<Employee=p({<Flag={1}>} Employee)>}Date)
See post from Tresesco, that will do the job:
Count({$<Employee=p({<Flag={1}>}Employee)>}Date)
Hi Tresesco and Jochem,
This is working great. The P() function is kind of new for me. Good for me to get some knowledge of it. Thanks for your help.