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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
Ali123
Advocate I
Advocate I

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
Advocate I
Advocate I

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
Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors