Unable to delete an attribute because it referencing incorrect queries and calculated fields