Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Difference between two groups in the same column

I have data similar to the following   Group Value 1 25 1 25 3 34 3 34 3 34 4 27 4 27 7 55 7 55   Essentially, every value in [Group] has the same v...
  • amitchandak's avatar
    amitchandak
    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