Hi everyone!
Could you please tell me why my search doesn't work.
It has variable click.value $offer_var$ that can be one of the several offer names. Each offer has distinct value of times that a user can exploit it. I need to figue out how many users have reached the maximum value.
source="my_source", service_id="my_service_id" tx_status_id=COMPLETED | fillnull value=none offer_uid | where offer_uid=$offer_var$ | eval max_usage=case(offer_uid == "free_winter", 2, offer_uid == "free_summer", 15, offer_uid == "free_spring", 10) | stats count as usage by user_uid | stats count(eval(usage = max_usage)) as used_offer_completely
For testing purposes I put the name of one of the offers instead of $offer_var$.
Search shows 0 for used_offer_completely but the real result should be other.
I've stumbeled upon my old question and realized that I should change the query as follows:
source="my_source", service_id="my_service_id" tx_status_id=COMPLETED | fillnull value=none offer_uid | where offer_uid=$offer_var$ | eval max_usage=case(offer_uid == "free_winter", 2, offer_uid == "free_summer", 15, offer_uid == "free_spring", 10) | eventstats count as usage by user_uid | stats count(eval(usage = "max_usage")) as used_offer_completely
I've stumbeled upon my old question and realized that I should change the query as follows:
source="my_source", service_id="my_service_id" tx_status_id=COMPLETED | fillnull value=none offer_uid | where offer_uid=$offer_var$ | eval max_usage=case(offer_uid == "free_winter", 2, offer_uid == "free_summer", 15, offer_uid == "free_spring", 10) | eventstats count as usage by user_uid | stats count(eval(usage = "max_usage")) as used_offer_completely