Forum Discussion
Renna
2 years agoFrequent Visitor
Matrix Row Subtotal for Text as the most frequent values, instead of "First"
I have read many posts that mention similar topics, but they don't necessarily cover what I'm looking for. Usually, for text values in the Matrix, we only have options to display them as 'First', 'La...
- Anonymous2 years ago
Hi Renna ,
You can create a measure as below and replace the field [Project Manager] with this new measure.
MProjectManager = VAR MaxCount = MAXX ( VALUES ( 'Table'[Project Manager] ), CALCULATE ( COUNT ( 'Table'[Project Manager] ) ) ) VAR PMList = CONCATENATEX ( FILTER ( VALUES ( 'Table'[Project Manager] ), CALCULATE ( COUNT ( 'Table'[Project Manager] ) ) = MaxCount ), 'Table'[Project Manager], ", " ) VAR ProjectTypeTable = SUMMARIZE ( 'Table', 'Table'[Project Types], 'Table'[Project ID], 'Table'[Project Manager] ) VAR ModeValue = TOPN ( 1, ADDCOLUMNS ( ProjectTypeTable, "SRevenue", CALCULATE ( SUM ( 'Table'[Revenue] ), ALLEXCEPT ( 'Table', 'Table'[Project Manager], 'Table'[Project ID], 'Table'[Project Types] ) ) ), [SRevenue], DESC ) RETURN IF ( IFERROR ( SEARCH ( ",", PMList, 1, 0 ), 0 ) > 0, MAXX ( ModeValue, [Project Manager] ), PMList )Best Regards
- 2 years ago
pls try this
Anonymous
2 years agoNot applicable
Hi Renna ,
You can create a measure as below and replace the field [Project Manager] with this new measure.
MProjectManager =
VAR MaxCount =
MAXX (
VALUES ( 'Table'[Project Manager] ),
CALCULATE ( COUNT ( 'Table'[Project Manager] ) )
)
VAR PMList =
CONCATENATEX (
FILTER (
VALUES ( 'Table'[Project Manager] ),
CALCULATE ( COUNT ( 'Table'[Project Manager] ) ) = MaxCount
),
'Table'[Project Manager],
", "
)
VAR ProjectTypeTable =
SUMMARIZE (
'Table',
'Table'[Project Types],
'Table'[Project ID],
'Table'[Project Manager]
)
VAR ModeValue =
TOPN (
1,
ADDCOLUMNS (
ProjectTypeTable,
"SRevenue",
CALCULATE (
SUM ( 'Table'[Revenue] ),
ALLEXCEPT (
'Table',
'Table'[Project Manager],
'Table'[Project ID],
'Table'[Project Types]
)
)
),
[SRevenue], DESC
)
RETURN
IF (
IFERROR ( SEARCH ( ",", PMList, 1, 0 ), 0 ) > 0,
MAXX ( ModeValue, [Project Manager] ),
PMList
)
Best Regards
- Renna2 years agoFrequent Visitor
It works perfectly. Thank you so much!