Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Power BI To Automatically Send Alerts if Conditions Are Met

Hi

 

i was asked to put a feature in the power bi wherein emails will be send to people when several conditions are met. E.g. Finance received emails  if cost exceed sales, logistics if stocks below than threshold, etc.

  • In fact the alert is only for you, you can share the repport for people of your organisation, but you can only have the alert by mail for you. You could perhaps use a low code solution to manage the mail to create automaticaly an alert to someone else when you  receive the alert on your own mail. It could be possible with the tools Make or Zapier.

    If someone else have received the repport that you've shared to him, he could create his own alert by data activator very quickly.

15 Replies

  • In fact the alert is only for you, you can share the repport for people of your organisation, but you can only have the alert by mail for you. You could perhaps use a low code solution to manage the mail to create automaticaly an alert to someone else when you  receive the alert on your own mail. It could be possible with the tools Make or Zapier.

    If someone else have received the repport that you've shared to him, he could create his own alert by data activator very quickly.

  • Hello, you need only to set up an alert in the Service Power BI (after you have published your Dashboad) You can click on the (...) of the visualisation on Set up an alert, and it will open Data Activator, you 'll be able to send an email or a Teams message  on a condition.

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Is the same service power bi a separate feature from power bi desktop?

    • Anonymous's avatar
      Anonymous
      Not applicable

       

      Hi,

       

      I have a few more questions as shown.

       

      1. Please share a measure for these conditions based on the variance -  a) Project No has no sales with cost resulting to negative variance, b. Project No has negative variance, c. Project No has sales with no cost & d. Project No has sales equals to cost resulting to no revenue.

       

      2. Can the alert mention the Project No experiencing the conditions above plus show the breakdown at the end of the comments?

       

      3. I also need help on how to color code each rows based on the conditions. The coding shall be red for conditions' a & b, amber for condition d and green for condition c.

       

       

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi,

       

      I created an alert but I believe it will be me that will receive the alert not the intended people. Any ideas what I'm doing wrong?

       

       

       

  • If you use PowerBI whith your Email, you've an acccount on the service, it is free.

    You've just to publish on the Web, and you'll have access with the link  given  by Desktop or  on this web adress : app.powerbi.com.

     

     

     

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi

       

      the pbix files are stored in the company's corporate online storage and a bit sticky in publishing data. Are there any other options of sending alerts not publishing the pbix?

  • You could use Power Automate, but I ve not tested this before. You create a jonction between PowerBI and the Mail. But I'm not sure that it will run without the publish...

  • You could insert the request in Power BI in excel and if you have reached a level send  an email with this code in Excel : (you should keep Excel open on the  server.)

    Sub SendEmail()

    Dim OutlookApp As Object
    Dim OutlookMail As Object
    Dim AdresseDestinataire As String
    Dim SujetEmail As String
    Dim CorpsEmail As String
    Dim FichierJoint As String

    'Var for the mail
    MailAdress = "[email protected]"
    SubjetEmail = "Sujet de l'email"
    BodyEmail = ""
    JoinFile = "C:\Chemin\Vers\Fichier\Joint.xlsx" ' Chemin complet vers le fichier joint (optionnel)

    ' Start Outlook
    On Error Resume Next
    Set OutlookApp = GetObject(Class:="Outlook.Application")
    If OutlookApp Is Nothing Then
    Set OutlookApp = CreateObject(Class:="Outlook.Application")
    End If
    On Error GoTo 0

    ' Create a new mail
    Set OutlookMail = OutlookApp.CreateItem(0)


    With OutlookMail
    .To = AdresseDestinataire
    .Subject = SujetEmail
    .Body = CorpsEmail
    If FichierJoint <> "" Then
    .Attachments.Add FichierJoint
    End If
    .Send
    End With

    ' Libérer les objets
    Set OutlookMail = Nothing
    Set OutlookApp = Nothing

     

    End Sub

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi

       

      I'm using a paid power bi if I publish it will it not be available to the public especially if they have the link?

  • To connect to app.powerbi.com  you have to give your organisation's email adress for the account with your password for this account. It's your own space, after that you can share your power bi by a link  as you could share a google drive, like below. (you can send a link that the receiver won't be able to share)

     

     

     

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi,

       

      I'm getting a different dashboard compared to yours as shown. I can't see the 2 boxes that you encircle.

       

      Need your assistance.

       

      //NT

       

       

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    @GuillaumePower 's workaround is valid.

     

    In addition to the Alert feature, there is a Data Activator in the Fabric, which can also be done.

    Data Activator is a no-code experience in Microsoft Fabric for automatically taking actions when patterns or conditions are detected in changing data. It monitors data in Power BI reports and Eventstreams items, for when the data hits certain thresholds or matches other patterns. It then automatically takes appropriate action such as alerting users or kicking off Power Automate workflows.

    For details, please refer to

    Get started using Data Activator - Microsoft Fabric | Microsoft Learn

     

    Best Regards,

    Neeko Tang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi

       

      This is great! But I still need some hand holding because I'm very new on this field