title: Facing issue in sorting a matrix by a measure in my situation
body: <p>I am facing issues in sorting a matrix by a measure. The problem is as follows:</p>
  <p><a href="https://i.stack.imgur.com/PiGJK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PiGJK.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/YZqme.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YZqme.png" alt="enter image description here" /></a></p>
  <p>Where:</p>
  <p>Measure 1 =SUMX(Table1,[Column C] + [Column D])</p>
  <p>I have a matrix with following Field Placement:</p>
  <p>Rows: Column A, Column B</p>
  <p>Column: Values (Table 2)</p>
  <p>Values: Measure 2</p>
  <p>Where:</p>
  <p>Measure 2=IF(Table2[Index]=1,table1[Column C],IF(Table2[Index=2,Table1[Column D],IF(Table2[Index]=3,[Measure1])))</p>
  <p>I got the matrix as follows:</p>
  <p><a href="https://i.stack.imgur.com/sQv8T.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sQv8T.png" alt="enter image description here" /></a></p>
  <p>Now I want to sort this matrix by Measure 1</p>