Forum Discussion
Matrices
X Y
1 2
3 4
5 6
Does anyone know if there is a way to use the columns of the matrices. For example using Y to divide X, and get a third column?
Hi kitala11 ,
You can use columns in Matrix visual to carry on division by creating three Measure.
In the sample, there are item, X, and Y columns in a table called matrix. They are used to build Matrix visual.
Three Measure:
MX = SUM(matrix[X])
MY = SUM(matrix[Y])
divide = matrix[MY]/matrix[MX]
The result looks like this:
Best Regards,
Caiyun Zheng
Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
4 Replies
- mahoneypatMicrosoft Employee
Are X and Y columns in your table? If so, you can just add a custom column in the query editor with
= [X]/[Y]
Or you can do it with a DAX calculated column, or with a measure. Please describe your situation further if the above isn't what you need.
Regards,
Pat
- kitala11Helper III
No they arent. Those columns are produced with the matrice. So what I really what to know is as I mentioned. If it is possible to calculate Y/X for example. With the columns produced by the matrice directly or I'd have to go another sort of roundabout way
- amitchandakSuper User
kitala11 , New column
divide([Y],[X])
is that giving problem.
X and Y should be columns, If they are measures, new column is not possible
- v-cazheng-msftCommunity Support
Hi kitala11 ,
You can use columns in Matrix visual to carry on division by creating three Measure.
In the sample, there are item, X, and Y columns in a table called matrix. They are used to build Matrix visual.
Three Measure:
MX = SUM(matrix[X])
MY = SUM(matrix[Y])
divide = matrix[MY]/matrix[MX]
The result looks like this:
Best Regards,
Caiyun Zheng
Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.