Forum Discussion
Difference between two groups in the same column
- 6 years ago
I created a rank column and a measure like given below
Column = RANKX(Sheet1,Sheet1[Group],,DESC,Dense) Measure = divide(maxx(FILTER(Sheet1,Sheet1[Column]=1),Sheet1[Value])-maxx(FILTER(Sheet1,Sheet1[Column]=2),Sheet1[Value]),maxx(FILTER(Sheet1,Sheet1[Column]=1),Sheet1[Group])-maxx(FILTER(Sheet1,Sheet1[Column]=2),Sheet1[Group]))You can create one more for the second. Unless you were looking for some other display.
Link : https://www.dropbox.com/s/p3ewc9h970503qh/groupRank.pbix?dl=0
amitchandak I appreciate the suggestion, but this did not work for me. The ranking solution in the article did not provide consistent ranking (ranks jump from 3 to 7 or from 14 to 19) instead of 1, 2, 3, etc. Additionally, there are so many ranks for the groups that the formula provided would not work. I would need to know if there is a way to use DAX to automatically grab the next lowest/highest rank, regardless of the difference between them.
I created a rank column and a measure like given below
Column = RANKX(Sheet1,Sheet1[Group],,DESC,Dense)
Measure = divide(maxx(FILTER(Sheet1,Sheet1[Column]=1),Sheet1[Value])-maxx(FILTER(Sheet1,Sheet1[Column]=2),Sheet1[Value]),maxx(FILTER(Sheet1,Sheet1[Column]=1),Sheet1[Group])-maxx(FILTER(Sheet1,Sheet1[Column]=2),Sheet1[Group]))
You can create one more for the second. Unless you were looking for some other display.
Link : https://www.dropbox.com/s/p3ewc9h970503qh/groupRank.pbix?dl=0