Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Ali123
Frequent Visitor

Table / Matrix: Total Column on first position

How we can move column on left or first position in matrix/ Table? Using logic without using formatting tool.
@amitchandak

@moizsherwani 

 

matrix_LI.jpg

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @Ali123 ,

 

The only way to make this to work is to create a new measure with the total value, I assume that you are using a column to get the Surly and Trek values on the matrix so if you create a table with the following setup:

ID Type
1 Total
2 Surly
3 Trek

 

Then do a Sort by on the column of the Type by the ID.

 

After create a measure similar to this:

Total Value =
SWITCH (
    SELECTEDVALUE ( TotalTable[Type] ),
    "Total", SUM ( 'Surly/Trek'[Value] ),
    CALCULATE (
        SUM ( 'Surly/Trek'[Value] ),
        'Surly/Trek'[Type] = SELECTEDVALUE ( TotalTable[Type] )
    )
)

 

Result below and in attach PBIX:

MFelix_0-1651053922360.png

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

3 REPLIES 3
Ali123
Frequent Visitor

Thanks bro.

MFelix
Super User
Super User

Hi @Ali123 ,

 

The only way to make this to work is to create a new measure with the total value, I assume that you are using a column to get the Surly and Trek values on the matrix so if you create a table with the following setup:

ID Type
1 Total
2 Surly
3 Trek

 

Then do a Sort by on the column of the Type by the ID.

 

After create a measure similar to this:

Total Value =
SWITCH (
    SELECTEDVALUE ( TotalTable[Type] ),
    "Total", SUM ( 'Surly/Trek'[Value] ),
    CALCULATE (
        SUM ( 'Surly/Trek'[Value] ),
        'Surly/Trek'[Type] = SELECTEDVALUE ( TotalTable[Type] )
    )
)

 

Result below and in attach PBIX:

MFelix_0-1651053922360.png

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



amitchandak
Super User
Super User

@Ali123 , you have to create a table with Total and these values and create a sort order

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.