Power Dynamics
  • Power Dynamics
  • 🍕My name
  • D365 CE
    • Copilot
      • 🥐Add Copilot into Rich Text Control
    • Sales
      • Copilot in D365 Sales
      • Export record to PDF
    • Customer Experience
      • Contact Center (Omnichannel)
        • 🐚Internal Live Chat in MDA
        • 📢Add Chat Widget to Power Pages - Proactive Chat
      • Attachment Control
      • Case Routing: Basic Routing rule set
      • Custom SLA for any Entity
      • Customer Insight
        • Journey - Custom Trigger - Call Power Automate
    • Field Service
  • Power Platform
    • Analytics
    • Dataverse
      • Use case for the feature of Record ownership across Business Unit
      • 💡Workaround: Change the OOB "Exchange Rate" of a record
      • Using a Virtual Entity to store historical log (sample)
      • Disable Empty Address record
      • Using Adaptive card
      • Block Unmanaged Customizations
      • 🪃Recycle Bin on Dataverse (Preview)
    • Model Driven App
      • 💡Run SSRS report on MDA mobile
      • 💡Tip: Create a Security Role with "App Opener" minimum privileges
      • Tag @person to notify in MDA
      • Auto search on the Lookup field
      • Activities with multiple related records
      • Embedded Power BI - Dashboard
      • Embedded Power BI - Form
      • "Custom Help" - Is it help?
      • New modern Command Bar
      • Tip: Hide the button "Add Existing Record" on subgrid
      • Custom Page - Why not?
      • Hiding sensitive column data
    • Canvas App
    • Fabric & Power BI
      • New Text slicer
      • Dataverse link to Microsoft Fabric
      • 💡Leveraging Interactive Warehouse Floor Maps in Power BI
      • Calculation Group for Time Intelligence
    • Power Automate
      • ✅Sequential Approval
      • 📤Create an Appointment by Outlook Graph API
      • Dowload SSRS Report and Send email
      • Power Automate: Add a table in Email
      • 💡Tips: Get "DisplayName" of the Lookup field on Power Automate
      • E-sign: Power Automate & DocuSign
  • D365 Finance & Operation
    • General
      • 🇻🇳D365 FnO - Virtual entities: Use case
    • Finance
      • Consolidating Customer & Vendor Balances
    • Supply Chain
      • Landed Cost Series
        • Landed Cost- Essential Configuration
        • Landed Cost Scenarios 1
Powered by GitBook
On this page
  • Embedded Dashboard PwBI
  • Using Variables to change PwBI report

Was this helpful?

  1. Power Platform
  2. Model Driven App

Embedded Power BI - Dashboard

Power BI, Model Driven App

PreviousActivities with multiple related recordsNextEmbedded Power BI - Form

Last updated 1 year ago

Was this helpful?

Hello mọi người.

Chắc hẳn mọi người đã làm nhiều về Dashboard trong D365 CE rồi nhĩ! Dashboard trong D365 ngày trước chia làm hai loại chính là Classic Dashboard và Intractive Dashboard, sau này khi phát triển mạnh mẽ Power Platform thì Microsoft đã cho phép chúng ta nhúng thẳng report/dashboard Power BI trên Dashboard area ở D365. Có thể nói, việc cho phép nhúng thẳng Power BI report/ dashboard vào D365 mở ra cho chúng ta khả năng sáng tạo rất rất nhiều. Và mới đây, Microsoft con enable thêm tính năng Visualize this view rất hiệu quả, giúp user có thể tạo nhanh report và phân tích nhanh số liệu.

Bài viết này mình sẽ nói vè cách nhúng Power BI report vào Dashboard và cách nhúng vào form trên Model Driven App nhé.

Embedded Dashboard PwBI

Đầu tiên thì chúng ta cần có cái Dashboard hay cái Report PwBI đươc public lên Power BI Service trước đã - powerbi.com đó anh em. Việc public cái report này lên trên Power BI Service thì mọi người biết rồi hén - chỉ cần mở file .pbix bằng Power BI Desktop, sau đó đăng nhập tài khoản rồi click Public --> BÙM xong: Report đã được public lên Power BI Service. Note: Mọi người lưu ý, chỗ này khi public thì mình cần chọn 1 cái Workspace khác vs "My Workspace" nha.

Sau khi đã có report rồi thì giờ vào Solution của mình và tạo Dashboard thôi.

Sau đó thì chọn như hình:

  1. Chọn Power BI Report: nếu mọi người muốn nhúng nguyên report (trên PwBI Service). Chọn Power BI Dashboard: nếu mọi người muốn nhung Dashboard (trên PwBI Service).

  2. Workspace: chính là Workspace mà mọi người public report lúc nãy.

  3. Power BI report: chọn Report mọi người cần nhúng vào Dashboard D365.

Và click OK để hoàn thành.

Tuy nhiên, còn 1 lưu ý nhỏ, sau khi đã tạo Dashboard xong thì mọi người phải nhớ vào App chọn Dashboard và nhớ select cái DB Power BI Embedded vừa rồi nữa.

Tới đây là xong phần Dashboard Power BI Embedded nha.

Thế nhưng anh em có tự hỏi, lúc mà deploy cái Dashboard Power BI Embedded từ môi trường DEV sang môi trường PRODUCTION thì sẽ như nào không? Bởi, nếu lúc dev, thì trên môi trường DEV mọi người đang chọn là cái Report PwBI dùng cho môi trường DEV, lên PRODUCTION thì mình phải chọn Report PwBI dùng cho PRODUCTION. Do đó, mình đã sử dụng Environment Variables (Biến môi trường) để khai báo Report Power BI nào dùng cho DEV, cái nào dùng cho PRODUCTION.

Using Variables to change PwBI report

Do mình ko có 2 environment để làm, nên để Demo, thì mình sẽ thay đổi value của Variable để show report nhé. Một khi đã thay đổi Value của Environment Variable trên PRODUCTION rồi, thì khi deploy từ solution từ DEV qua PRODUCTION nó cũng sẽ không bị override đâu.

Mình vào Solution, chọn Power BI Embedded dashboard (nếu đã có ) hoặc chưa có thì mọi người tạo mới nha. Mình sẽ sử dụng lại cái dashboard khi nãy. Click Edit dashbaord > chọn Use environment variable để khai báo report cho từng môi trường nhé.

Tạo biến môi trường mới, hệ thống sẽ bắt chọn Default Work Space và Default Report. Tuy nhiên, mình có thể tạo <+New Value> để override cái giá trị mặc định.

Sau khi tạo xong, mọi người quay lại chỗ component Environment Variables > Chọn biến cần sửa như hình. Rồi copy giá trị câu Json vào là ok.

BÙM!!! vậy là new value xong là ghi đè được report rồi. Trên môi trường PRODUCTION, bạn chỉ cần vào Biên môi trường chỉnh sửa lại là được. :)

Cấu trúc câu Json và cách tìm value mình note dưới này nha mọi người:

{"group":{"id":"[GroupID]","name":"[Workspace Name]"},"component":{"id":"[Report ID]","name":"[Report Name]","type":"Report","embedUrl":"https://app.powerbi.com/reportEmbed"}}

Để xác định các tag trong đoạn json ở trên, bạn mở cái report Power BI cần nhúng ra để lấy htông tin:

  • [Group ID]: chính là khung màu xanh (sau chữ groups/).

  • [Workspace Name]: chính là khung màu tím (tên của Workspace chứa report)

  • [Report ID]: chính là khung màu đỏ (sau chữ reports/).

  • [Report Name]: chính là khung màu cam (tên của report đấy).

// Sampe PwBI Report: FE_Poc
{"group":{"id":"d5682936-b896-4a08-8b3b-d1844fb6fb55","name":"Fabric"},"component":{"id":"1bd6d6f2-5627-4c08-bfbd-938159019a24","name":"FE_Poc","type":"Report","embedUrl":"https://app.powerbi.com/reportEmbed"}}

Giờ thì check thử thôi nào....

Hiện tại còn 1 phần nữa là nhúng cái Report vào Form trên Model Driven App và add thêm pre-filtering cho cá report đó theo record đang được mở.

Nhưng mà giờ hơi trễ chút, nên hẹn mọi người ở bài sau nha.

Thân chào mọi người! [NTD]yns.asia

Visualize this view
Public PwBI report to Power BI Service
Power BI embedded Dashboard
Configure Power BI Embedded Dashboard
Sample Power BI Embedded Dashboard
Edit dashbaord and using environment variable
New variable with default value
New value for Variable
Open a PwBI Report
New PwBI Report with new value of Variable
Page cover image