Forum Discussion
twice email when alert is triggerd
Hi Pikachu-Power,
I understand your scenario, you can refer my power automate flow below
You need to create more steps to define condition if you want to send mail or not:
Step 1. When alert trigged: eg. Target Sales achieved 50% (you set on manage alerts on dashboard KPI)
Step 2. Get a row: create an excel file on Onedrive, create a table data on excel to save current sales of KPI. This step helps you keep value KPI up-to-date and this place you can compare lastSales and currentSales to define your condition at the next step.
Step 3. Compose: inputs the syntax below to get value in excel file you created at Step 2. This step helps you keep value lastSales
Step 4. Compose: Inputs the Syntax below to get value CurrentSales. This step helps you keep value newest of KPI on dashboard (after you refresh Power BI)
Step 5. Condition: you create conditions to seperate whether you want to send mail or not send mail. The condition is True when: 1) float(coalesce(outputs('CurrentSales'),0)) is greate than 0.5
2) float(coalesce(outputs('LastSale'),0)) is less or equal to 0.5
and if True: you send mail & update a row for excel online.
Step 6: If false, you just only update a row. This step helps you save the newest of the value on KPI dashboard into the cell on Excel online.
outputs('CurrentSales')
These steps helps you config flow that send mail only one when trigger is alert, and then if alert is trigged one more time, the condition will be false and not send mail again, just only update a row for excel online.
But when KPI from 50% then down 40% and up 60%, mail notification will send again (that makes sense!)
If you have any question, you can send email: [email protected]
Thanks