Just making sure we got the information right here:
- This is in Power Automate Flow correct? not in Power Automate Desktop?
- This is an Excel online table not a desktop table correct?
If both of those assumptions are yes then simply do the following:
- Create a "list rows present in table" excel (online) action
- Select advanced options
- Write the filter query, in your case you'd do something like " Enterprise ID eq
'ABC@xyz.com' " (without the double quotes but with single quotes around string values)
- Create a Filter Array action, pass it the table array via dynamic expression, add the necessary filters for leave type, e.g. Leave type = Casual leave, Leave type = Sick leave, etc.
- Create a compose action, write the expression Length("Your resulting composed table / array here via dynamic expression"), this will give you count of rows, do w/e you need with that.
Now this will just be a working first example, if we now want to move onto making it more general you'll need to create a list rows of distinct Enterprise ID values and then put everything I've listed into a for each to automatically go through all distinct enterprise ids'
Lemme know if ya need anything else.