Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi @henryco88 ,
Based on my test, it is not supported in Power BI currently. You can vote this similar idea: Table / Matrix: Total Column on first position.
In addition, you can try to achieve your requirements like so:
Sample table:
Category | SubCategory | Value |
A | a1 | 1 |
A | a2 | 2 |
A | a3 | 3 |
B | b1 | 4 |
B | b2 | 5 |
B | b3 | 6 |
1. Create a table.
Table 2 =
VAR t1 =
DISTINCT ( 'Table'[SubCategory] )
VAR t2 =
ADDCOLUMNS ( t1, "Order", RANKX ( t1, [SubCategory],, ASC, DENSE ) + 1 )
VAR t3 =
DATATABLE ( "Total", STRING, "Order", INTEGER, { { "Total", 1 } } )
RETURN
UNION ( t3, t2 )
2. Create a measure.
Measure =
VAR a =
SELECTEDVALUE ( 'Table 2'[Total] )
RETURN
IF (
a = "Total",
CALCULATE ( SUM ( 'Table'[Value] ), ALLEXCEPT ( 'Table', 'Table'[Category] ) ),
CALCULATE (
SUM ( 'Table'[Value] ),
FILTER ( ALLEXCEPT ( 'Table', 'Table'[Category] ), 'Table'[SubCategory] = a )
)
)
3. Create a matrix visual.
Best regards
Icey
If this post helps, then consider Accepting it as the solution to help other members find it faster.
Hi @henryco88 ,
Based on my test, it is not supported in Power BI currently. You can vote this similar idea: Table / Matrix: Total Column on first position.
In addition, you can try to achieve your requirements like so:
Sample table:
Category | SubCategory | Value |
A | a1 | 1 |
A | a2 | 2 |
A | a3 | 3 |
B | b1 | 4 |
B | b2 | 5 |
B | b3 | 6 |
1. Create a table.
Table 2 =
VAR t1 =
DISTINCT ( 'Table'[SubCategory] )
VAR t2 =
ADDCOLUMNS ( t1, "Order", RANKX ( t1, [SubCategory],, ASC, DENSE ) + 1 )
VAR t3 =
DATATABLE ( "Total", STRING, "Order", INTEGER, { { "Total", 1 } } )
RETURN
UNION ( t3, t2 )
2. Create a measure.
Measure =
VAR a =
SELECTEDVALUE ( 'Table 2'[Total] )
RETURN
IF (
a = "Total",
CALCULATE ( SUM ( 'Table'[Value] ), ALLEXCEPT ( 'Table', 'Table'[Category] ) ),
CALCULATE (
SUM ( 'Table'[Value] ),
FILTER ( ALLEXCEPT ( 'Table', 'Table'[Category] ), 'Table'[SubCategory] = a )
)
)
3. Create a matrix visual.
Best regards
Icey
If this post helps, then consider Accepting it as the solution to help other members find it faster.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
56 | |
55 | |
54 | |
37 | |
29 |
User | Count |
---|---|
77 | |
62 | |
45 | |
40 | |
40 |