0

Alerts that loop through multiple data points

Hello Pyramid team!

I'm trying to send an alert for every country in which the total talk time grew by 20%+ compared to last month, as seen in this discover:

 Since I have dozens of countries in my list, I can't create a separate alarm for each country.

Is there a way for me to create a process that loops through every country, check if there's a 20%+ increase and send an alert if the condition is met?

 

Thank you!

4 replies

null
    • NPANS
    • 7 days ago
    • Reported - view

    The alerts are built using the dynamic text engine - which may have the formulas you need. 

    • So, build a basic alert.
    • Choose advanced in the dialog
    • Edit the trigger and add/update the logic of the trigger. 

    You might be able to construct a very complex formulation to capture what you want and then trigger the alert for you. You can use the "Loop" and "If" functions from the Common library to logically read your data points.  This is a hint of what may work.

    Loop(if(data(index,1)>0.20,label(1,1,index) + " - ",""), 0, 11)
    
      • Shir_BenGal
      • 3 days ago
      • Reported - view

       Thank you, tried to do this but it seems that the alert dialog doesn't support the use of loops but only takes one argument at a time

    • Customer Solutions Architect
    • Moshe_Yossef
    • 2 days ago
    • Reported - view

    Hi  ,

    Well, the easy way is to create a warning that will be sent if there is any row in the report that exceeds 20%.

    In your trigger definition you can try the following code:

    data(lookupMaxRow(FindColumnNumber("Growth - MTD vs. LMTD","false")),FindColumnNumber("Growth - MTD vs. LMTD","false"))
    > 0.2

    This code finds the column named "Growth - MTD vs. LMTD", and then finds the the row with the maximal value in it.

    If the data in the max row exceeds 0.2, it will create an alert.

    The alert can simply state that "there are states with more than 20% increase".

    Another approach is to this with a publication.

    Create a similar discover that is already filtered to rows exceeding 20% increase.

    Put this discover in a publication.

    Create a schedule for this publication including a trigger.

    The trigger can just be set to NumberOfRows()>0.

    It will send a publication notifying that there is a growth in at least one country, and the publication link will download a file with the list of countries and their data.

    I hope this helps,

      • Shir_BenGal
      • 2 days ago
      • Reported - view

       
      Thank you, Moshe!
      I will probably use the second approach you suggested.

Content aside

  • Status Answered
  • 2 days agoLast active
  • 4Replies
  • 35Views
  • 3 Following