Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
In this tutorial step, you create a Power BI semantic model and report from the Fabric HorizonDB mirrored analytical copy.
Important
Fabric HorizonDB is in public preview. Capabilities, limits, and behavior might change before general availability. For more information, see Microsoft Fabric preview features.
Prerequisites
- Complete Load Fabric data into Fabric HorizonDB with a Copy job.
- Confirm that the mirrored customer and order tables are visible and current enough for the tutorial.
- Have permission to create a semantic model and report in
contoso-horizondb-tutorial.
Build the report from the SQL analytics endpoint. Don't connect the report directly to the operational PostgreSQL endpoint for this tutorial.
The current preview permits PostgreSQL connections only from the database creator. Report access is a separate analytical permission boundary and doesn't enable additional PostgreSQL identities.
Create the semantic model
- Open the SQL analytics endpoint associated with
contoso-orders-db. - Start the action to create a new Power BI semantic model.
- Select the mirrored
customersandorderstables from the schema shown by the endpoint. - Enter
contoso-orders-modelas the semantic model name. - Create the model.
- Open the model view.
- Confirm that
customers[customer_id]relates toorders[customer_id]. - If the relationship isn't detected, create a one-to-many relationship from
customers[customer_id]toorders[customer_id]. - Confirm that the order
totalcolumn uses a decimal numeric type and isn't summarized as text.
When the experience offers Direct Lake for this source, the model queries the OneLake analytical representation rather than the Fabric HorizonDB PostgreSQL endpoint.
Create measures
In the semantic model, create these measures:
Order count = COUNTROWS('orders')
Order total = SUM('orders'[total])
Latest source timestamp = MAX('orders'[created_at])
The latest source timestamp is the newest source timestamp present in the model. It doesn't prove that mirroring has no lag.
Create the report
- From
contoso-orders-model, create a blank report. - Save it as
contoso-order-operations. - Add a card visual with Order count.
- Add a card visual with Order total.
- Add a card visual with Latest source timestamp.
- Add a column or bar chart:
- Put
orders[status]on the category axis. - Put Order total on the value axis.
- Put
- Add a table visual with:
- Add
orders[order_reference]as a column. - Add
customers[customer_name]as a column. - Add
orders[order_date]as a column. - Add
orders[status]as a column. - Add
orders[total]as a column.
- Add
- Sort the table by order date, descending.
- Save the report.
For the unchanged tutorial data, the cards show an order count of 3 and an order total of 2655.75.
Validate the report
Compare the report totals with this query on the SQL analytics endpoint:
SELECT
COUNT(*) AS order_count,
SUM(total) AS order_total,
MAX(created_at) AS latest_source_timestamp
FROM horizon_sample.orders;
Use the actual mirrored schema name if it differs.
If the report and endpoint disagree:
- Refresh model metadata if the source schema changed.
- Check filters, relationships, column types, and measure definitions.
- Check mirroring freshness separately.
- Don't redirect reporting queries to PostgreSQL as a workaround for delayed mirroring.
Review report security
Fabric HorizonDB permissions aren't automatically reproduced on the mirrored analytical surface.
Before sharing the report:
- Identify who needs the report and semantic model.
- Grant only the required report, model, endpoint, and source permissions.
- Apply and test any required model security.
- Verify access with a non-owner test identity.
For more information, see Secure mirrored Fabric HorizonDB data.
Expected outcome
The workspace contains contoso-orders-model and contoso-order-operations. The report shows the order count, order total, latest mirrored source timestamp, totals by status, and individual order details.