Creating an analytic rule