3 Replies Latest reply on Oct 9, 2018 11:51 PM by Pak Hang Leung

    How to make a alert based on conditional values

    Pak Hang  Leung

      Hi all


      I have a report which shows the monthly sales for different markets.

      There are couples of countries there, and what I want to do is, to set up an alert in the server to relevant user that send out reminder email when the sales of Germany is lower than 50000 in certain month.

      However, I found that the alert in server cannot be applied to customs conditions (seems that only for axis value e.g sales ), and in the official website said that this is not officially supported. AT the same time when I searched for conditional alerts in google, I cannot find the setting in the server side to enable this. Does anyone know how to make a work around of that?


      The workbook is attached as reference. Many thanks!



      Pak Hang

        • 1. Re: How to make a alert based on conditional values
          Matt Coles

          So, you can build a custom condition. It just needs to be encoded as a continuous numeric measure on your viz. So it can end up making your viz look a little different, but you can do it. You can do something like:



          IF [Country] = 'Germany' 
              AND [Sales] < 50000
              THEN 1
          ELSE 0


          So you've got a 1 or 0 possibility coming out of that. You'd just drag that to, say, the Columns shelf in a new sheet, ensure it's set to Continuous, and name it "alert".



          That alone will create the alert. But if you want it to send you an image of the other viz, you'll need to embed it into a dashboard like so:



          Then you'll publish and set up the alert, like so:





          It's worth noting that the alert condition as shown in the calc above isn't going to give you what you want, unless you filter your viz down to the most recent month only. You'll need away to ignore all the other previous months, as you likely already know that you did/didn't exceed your threshold for those. So add another condition to the IF statement that compares whether Month is, say, the previous month to whatever the current DATE() is. Assuming that you're getting data in every month, and that every new month's worth of data described a completed month, that is. If you're refreshing the extract each time you add a new month's worth of data, this will work fine. However, if you're using a live connection, then the alert will run every hour, and you'll get lots of duplicate alerts. So you might also want to build in another condition that limits the alert to, say, just the first of each month, if you know you'll get data in by then for the prior month. Suppressing duplicate alerts is always the trickiest part.


          Hope that helps!

          4 of 4 people found this helpful
          • 2. Re: How to make a alert based on conditional values
            Michael Hesser

            Great explanation, Matt! I came here from another thread and your explanation was very helpful!

            • 3. Re: How to make a alert based on conditional values
              Pak Hang  Leung

              Hi Matt


              It works and thanks again for your help!