Forum Discussion
Create a button in Power BI
- 1 year ago
Power BI buttons can't directly trigger data refreshes in Azure Synapse Pipelines. However, you can achieve a similar experience using a combination of Power Automate and buttons. Here's how:
1. Create a Power Automate Flow:
Go to Power Automate (https://flow.microsoft.com/).
Create a new flow.
Choose "Automated cloud flow" as the trigger.
Search for "Power BI" and select the trigger "When a button is pressed in a report".
Connect to your Power BI service account.
In the "Report" field, select "SLA Dashboard".
In the "Button name" field, choose a descriptive name for your button (e.g., "Refresh Customer Data").
2. Use Conditional Logic based on User Role:- Add a "Condition" step.
- Use an expression like `userPrincipalName()` to get the logged-in user's email address.
- Check if the email address belongs to CustA or CustB using an "equals" condition.
3. Refresh Data based on User Role:- Add two separate "Azure Synapse Analytics" actions (one for CustA and one for CustB).
- Connect to your Azure Synapse Analytics workspace.
- In the "Trigger Now" field, set it to "Yes".
- Use conditional logic from step 2 to determine which action to execute.
- If the user is CustA, call the Azure Synapse action that refreshes the "CustA_Dashboard" view.
- If the user is CustB, call the Azure Synapse action that refreshes the "CustB_Dashboard" view.
4. (Optional) Refresh Power BI Dataset (Workspace 2):- You can add additional steps to refresh the relevant Power BI dataset in workspace 2. However, this refresh might not be instantaneous and might take some time to reflect in the report.
5. Create the Button in Power BI:- Go back to Power BI Desktop.
- In the "Insert" tab, select "Power Automate".
- Choose the flow you created in step 1.
- Format the button and place it in your report.
If it Helps Kudos to work and Accept it as Solution.
Power BI buttons can't directly trigger data refreshes in Azure Synapse Pipelines. However, you can achieve a similar experience using a combination of Power Automate and buttons. Here's how:
1. Create a Power Automate Flow:
Go to Power Automate (https://flow.microsoft.com/).
Create a new flow.
Choose "Automated cloud flow" as the trigger.
Search for "Power BI" and select the trigger "When a button is pressed in a report".
Connect to your Power BI service account.
In the "Report" field, select "SLA Dashboard".
In the "Button name" field, choose a descriptive name for your button (e.g., "Refresh Customer Data").
2. Use Conditional Logic based on User Role:
- Add a "Condition" step.
- Use an expression like `userPrincipalName()` to get the logged-in user's email address.
- Check if the email address belongs to CustA or CustB using an "equals" condition.
3. Refresh Data based on User Role:
- Add two separate "Azure Synapse Analytics" actions (one for CustA and one for CustB).
- Connect to your Azure Synapse Analytics workspace.
- In the "Trigger Now" field, set it to "Yes".
- Use conditional logic from step 2 to determine which action to execute.
- If the user is CustA, call the Azure Synapse action that refreshes the "CustA_Dashboard" view.
- If the user is CustB, call the Azure Synapse action that refreshes the "CustB_Dashboard" view.
4. (Optional) Refresh Power BI Dataset (Workspace 2):
- You can add additional steps to refresh the relevant Power BI dataset in workspace 2. However, this refresh might not be instantaneous and might take some time to reflect in the report.
5. Create the Button in Power BI:
- Go back to Power BI Desktop.
- In the "Insert" tab, select "Power Automate".
- Choose the flow you created in step 1.
- Format the button and place it in your report.
If it Helps Kudos to work and Accept it as Solution.