Forum Discussion
matrix visual with calculation group
- 6 months ago
Hi GQ00
This is a limitation of the matrix visual itself. The upper hierarchy levels act as column headers because they come from dimensions, and in a matrix, measures are always placed at the lowest level of the hierarchy.
A workaround is to materialize the measure results into a physical column using a disconnected table. You can reuse the field parameter table as that disconnected table, but it won’t behave as originally intended — it will mainly act as a placeholder for the measure values rather than a true parameter.
Please see the attached pbix.
- 6 months ago
a — The numbers must match, since they are the basin in conditionally returning the measures.
b — That format string would only work if it were plain text rather than a DAX expression. DAX does not provide a function that can evaluate a DAX expression stored as text. Therefore, a separate conditional measure must be created and used as the dynamic format string. For the percentage variance, the format string can be changed directly within the calculation item settings.
At the moment, you can’t manually “hand arrange” the column order in a single Matrix when a Calculation Group is used as a column hierarchy.
If you need full control (and/or multiple calc groups), build a disconnected table like:
-
Metric (Sales / Orders / ATV)
-
CalcItem (Actual / PY / YoY%)
-
SortOrder
Then use one dynamic measure with SWITCH() to return the right calculation for the selected layout row. This bypasses the Matrix “crossjoin + fixed hierarchy” behavior.