Forum Discussion
Sum 2 columns in matrix table
- 4 years ago
It's possible but not simple. The problem is that you currently have one measure (llosc_dni) computed against two dimensions (Nazwisko_imie and Title) but you want to add a new measure that acts as an extra Title dimension value. Measures get evaluated in the context generated by the dimensions you put on the rows and columns, which is why if you add a new measure, it shows up under each number 1-14.
To do what you want, there are two approaches I can think of:
- Remove the Title dimension from columns and create separate measures for each number you want to show.
- Alter the existing table or create a new table to use as your header that includes 15 and define a measure that switches calculations accordingly.
Here's an example of the second approach for a similar but more complex situation:
https://stackoverflow.com/questions/52632713/custom-aggregate-column-in-power-bi-matrix
It's possible but not simple. The problem is that you currently have one measure (llosc_dni) computed against two dimensions (Nazwisko_imie and Title) but you want to add a new measure that acts as an extra Title dimension value. Measures get evaluated in the context generated by the dimensions you put on the rows and columns, which is why if you add a new measure, it shows up under each number 1-14.
To do what you want, there are two approaches I can think of:
- Remove the Title dimension from columns and create separate measures for each number you want to show.
- Alter the existing table or create a new table to use as your header that includes 15 and define a measure that switches calculations accordingly.
Here's an example of the second approach for a similar but more complex situation:
https://stackoverflow.com/questions/52632713/custom-aggregate-column-in-power-bi-matrix
Thank you very much. You saved me.
- Andre19903 years agoFrequent Visitor
How did you manage to get it right?