Forum Discussion
Ali123
4 years agoAdvocate 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
- 4 years ago
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
4 years agoSuper 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: