 # Help in Formula with isblank()

Team,

I want to Count the total number of Pending tasks of a user, it is working fine.
But when we want if Zone is bank then count Pending task of user else count pending task which is equal to zone is not working.

Working Formula: COUNTA( LOOKUP([Asset_Visit_Status.Status] , AND( Asset_Visit_Status.Sale_Coordinator = USEREMAIL , Asset_Visit_Status.Status = “Pending” , Asset_Visit_Status.Created_At >= from , Asset_Visit_Status.Created_At <= to)))

Not Working Formula: IF( ISBLANK( zone) , COUNTA( LOOKUP([Asset_Visit_Status.Status] , AND( Asset_Visit_Status.Sale_Coordinator = USEREMAIL , Asset_Visit_Status.Status = “Pending” , Asset_Visit_Status.Created_At >= from , Asset_Visit_Status.Created_At <= to) , COUNTA( LOOKUP([Asset_Visit_Status.Status] , AND( Asset_Visit_Status.ADM_Zone = zone , Asset_Visit_Status.Status = “Pending” , Asset_Visit_Status.Created_At >= from , Asset_Visit_Status.Created_At <= to)))))) @kundan.jha

Looks like there is incorrect usage of brackets in your second formula. IF() function usually has 3 parameters, first is condition, second is value when true and 3rd is value when false. But in your case there is only 2 parameters with no 3rd parameter value when condition is false.

Check and Try this below formula, if this is what you are trying to achieve -

``````    IF( ISBLANK( zone) , COUNTA( LOOKUP([Asset_Visit_Status.Status] , AND( Asset_Visit_Status.Sale_Coordinator = USEREMAIL , Asset_Visit_Status.Status = “Pending” , Asset_Visit_Status.Created_At >= from , Asset_Visit_Status.Created_At <= to))) , COUNTA( LOOKUP([Asset_Visit_Status.Status] , AND( Asset_Visit_Status.ADM_Zone = zone , Asset_Visit_Status.Status = “Pending” , Asset_Visit_Status.Created_At >= from , Asset_Visit_Status.Created_At <= to))))
``````

Also, instead of ISBLANK(zone), you can simply use zone = “” , something like -

``````    IF( zone="" , COUNTA( LOOKUP([Asset_Visit_Status.Status] , AND( Asset_Visit_Status.Sale_Coordinator = USEREMAIL , Asset_Visit_Status.Status = “Pending” , Asset_Visit_Status.Created_At >= from , Asset_Visit_Status.Created_At <= to))) , COUNTA( LOOKUP([Asset_Visit_Status.Status] , AND( Asset_Visit_Status.ADM_Zone = zone , Asset_Visit_Status.Status = “Pending” , Asset_Visit_Status.Created_At >= from , Asset_Visit_Status.Created_At <= to))))
``````

Hope this helps!