Forum Discussion

czuniga's avatar
czuniga
Helper III
6 years ago
Solved

GroupBy while retaining multiple values.

I have a dataset like the following: a 1 a 1 a 1 a 2 b 2 b 3 b 4 c 5 d 4 d 4 d 6 d 7 e 8 e 8 e 9 e 8 e 8 e 8   I'm trying...
  • v-easonf-msft's avatar
    6 years ago

    Hi , czuniga 

    If  this is  the expected result you want ,please follow these steps:

    1.Create a index column in query editor

    2.Create calculate column as below:

     

    Column = 
    var _minindex=MINX(FILTER('Table1','Table1'[Column1]=EARLIER(Table1[Column1])),'Table1'[Index])
    Return
    CALCULATE(MAX('Table1'[Coulumn2]),FILTER(ALL(Table1),'Table1'[Index]=_minindex))

     

     

    pbix attached 

    The result will show as below:

    If it doesn't meet your requirement,please  show me your expected result in excel.

     

    Best Regards,
    Community Support Team _ Eason