Hey! đź‘‹
Great question—this is a super common scenario in financial and order reporting where you want to pivot data horizontally across line items. You’re essentially trying to transpose the usual matrix layout, and Power BI isn’t natively wired for this kind of layout (order lines as columns and measures as rows), but there are a few ways to pull it off.
Here’s a couple of approaches you can try:
Option 1: Dynamic Matrix via UNPIVOT (Best for Static Number of OrderLines)
-
Create a calculated table in Power BI using DAX or do the transformation in Power Query:
-
Unpivot your fact table so you get:
where “Attribute” is like Amount, Tax, Discount.
-
-
Use a Matrix visual:
-
Rows: Attribute
-
Columns: OrderLineID
-
Values: Value
-
This will get you the exact format you’re asking for—attributes on rows, each OrderLineID as a column.
Just keep in mind: this works well if the number of order lines is limited or predictable. If it’s too dynamic, the matrix can become messy or too wide to read.
Option 2: Use a Pivot Table in Excel via Analyze in Excel
If this specific layout is more of a presentation requirement, you could offload the visual formatting to Excel via the “Analyze in Excel” option from Power BI. It gives you more layout freedom and works well if the dataset isn’t massive.

Be the first to post a comment.