Hi All,
I am trying to represent a measure in Matrix format and also want to represent total of measure of each row at the end of the matrix.
Measure =
VAR A =
MAXX(Values('Table’ [id]),
CALCULATE(MAX(‘Table’[Time of arrival]),
FILTER('Table', [Is Active?]="Yes")))
RETURN
MAXX(
Values(‘Table’ [id]),
CALCULATE(MAX(‘Table’[person_number]),
FILTER(’Table’, 'Table'[Time of arrival] = A)))
ACTUAL RESULT:
| JAN | FEB | MAR | APR | MAY | JUN |
Group A | 1 |
| 2 | 4 | 5 | 6 |
Group B | 4 | 5 | 3 | 5 |
| 7 |
TOTAL | 1 |
| 2 | 4 | 5 | 7 |
EXPECTED RESULT :
| JAN | FEB | MAR | APR | MAY | JUN |
Group A | 1 |
| 2 | 4 | 5 | 6 |
Group B | 4 | 5 | 3 | 5 |
| 7 |
TOTAL | 5 | 5 | 5 | 9 | 5 | 13 |
If you can provide your thoughts or views on this topic that would be really helpful.
Stay safe and healthy !
Solved! Go to Solution.
@ankbaner , Try a measure like
new meaure = sumx(values(Table[group]),[Measure])
Proud to be a Super User!
Hi @ankbaner
Try if this works, if not can you provide a data sample that is used for your matrix results
Measure =
VAR __matrix =
ADDCOLUMNS(
SUMMARIZE( 'Table', 'Table'[id], 'Table'[month] ),
"@maxTimeOfArrival",
CALCULATE(
MAX( 'Table'[Time of arrival] ),
'Table'[Is Active?] = "Yes"
)
)
RETURN
CALCULATE(
SUM( ‘Table’[person_number] ),
TREATAS(
__matrix,
'Table'[id], 'Table'[month], 'Table'[Time of arrival]
)
)
@ankbaner , Try a measure like
new meaure = sumx(values(Table[group]),[Measure])
Proud to be a Super User!
Featured Session: Drive Data Culture with Power BI- Vision, Strategy & Roadmap. Register here https://myignite.microsoft.com #MSIgnite #PowerPlatform #Power BI
Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!
User | Count |
---|---|
452 | |
184 | |
111 | |
60 | |
51 |
User | Count |
---|---|
435 | |
178 | |
120 | |
76 | |
74 |