March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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.
@henryco88 , I doubt such option for column total
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
114 | |
76 | |
57 | |
52 | |
44 |
User | Count |
---|---|
167 | |
117 | |
63 | |
57 | |
50 |