Bring DML to Power BI with Power Automate – Delete Records

Bring DML to Power BI with Power Automate – Delete Records

An exciting addition to Power BI April release is Power Automate Visual. This adds a host of capabilities to Power BI directly without relying on Power Apps. Users can now activate PA flows directly at the click of a button from Power BI passing necessary action values. This is not only restricted to operations like Send Mail or Create tasks but could also bring the Powerful Data Manipulation capabilities within Power BI. Here we take up a simple example to show how users can now delete records from Database with a click from Power BI :

Start with adding Power Automate Visual from AppSource

No alt text provided for this image


Here we have a Skills table imported from SQL Server displayed on pbix. Now we add the PA visual and map the field SkillID to the PA visual as we want that ID to be passed for deletion based on filtering on Power BI. Once mapped we click Edit on the PA visual and proceed :

No alt text provided for this image
No alt text provided for this image

Click New --> cloud flow . This takes to the flow editor within Power BI Desktop. Here select New Step and search for SQL Server , then add Delete Row

No alt text provided for this image
No alt text provided for this image


Here Configure the Delete Row to connect to the on-premise SQL Server we have populated data in power BI from and the table that we want to update. This would use the Gateway connection for an On-premise SQL Server in our case. The RowID field would prompt with the SkillID field that we have passed from Power BI , we need to select the same and the flow would then look like below :

No alt text provided for this image
No alt text provided for this image

Click Save and Apply and move back to the report:

No alt text provided for this image

Now format the Power Automate Visual to display as a button by resize and button text properties.

No alt text provided for this image

This is now ready for action :

Use filters to select the row that we want to delete. Eg. We select Skill ID 3 and click the Delete User which triggers the flow :

No alt text provided for this image

Since ours is an import model, we can now refresh the report to see the record deleted. You may verify it from the SQL Table too.

No alt text provided for this image

While this is an excellent addition to Power BI and provides the capability of interactivity like Power Apps to Power BI reports, with more power comes more responsibility in terms of security and Database write access restrictions which we would need to look into further!

Donnie Kerr

Technologist - 100% Hands-on builder

2 年

Nice work!

回复
Artur K?nig

POWER BI or DIE Podcast & Streams ???| Microsoft Data Plattform @ BI or DIE ??| Self-Service, Agile BI and Analytics ??| Power BI Fanboy ??| Sketchnotes ??| YouTube ??| TDWI Expert & Author ??

3 年

very cool! I also made a write-back example, but it not as "real-time" as yours because I use the import mode: https://youtu.be/CczGoQKX628 the discussion: https://www.dhirubhai.net/posts/datakoenigartur_power-bi-and-automate-activity-6792722373272584192-zHpR

Sujata Narayana

Principal GPM at Microsoft

3 年

Such a great use case, Abhinav! Thanks for sharing! Let me know if you have any feedback on how we can improve the visual and integration with Power Automate in general.

Kalicharan Khetwal

Tech Lead @Centric Consulting | Marathoner

3 年

That looks classy

Abhinav Singh

Data Visualization Architect & Evangelist| Super User Power BI| Delhi PUG lead| Speaker| Fabric| SSRS| AAS| Power Platform| Azure Data

3 年

Sujata Narayana PA Visual addition is amazing! Much more to explore!

要查看或添加评论,请登录

Abhinav Singh的更多文章

社区洞察

其他会员也浏览了