Thanks Adonio!
I just needed to close the brackets in the appendcols. Final query was:
| inputlookup mydata.csv
| where category= "category" AND assignment_group="myteam" AND yyyy_mm="$Datedropdown$"
| stats count as myteamstotal
| appendcols [ inputlookup mydata.csv
| where category= "category" AND yyyy_mm="$Datedropdown$"
| stats count as total]
| eval percent=(myteamstotal/total)*100
| fields percent
As an intermediate step to check any issues, you can view fields percent, myteamstotal, total as a table.
... View more