Forum Discussion

DonPepe's avatar
DonPepe
Icon for Helper II rankHelper II
4 years ago

Group in a group

Hi, 

 

I am in Power query and I have data like this : 

TypeStart End
018h0918h10
018h1018h15
018h1518h22
018h2218h30
XD18h3018h32
XD18h3218h40
XD18h4018h42
XD18h4218h48
018h4819h00
019h1019h13
LD19h1319h16
LD19h1619h20
LD19h2019h24
019h2419h37
019h3719h50
019h5019h55

 

And I want to have this :

TypeStart End
XD18h0918h10
XD18h1018h15
XD18h1518h22
XD18h2218h30
XD18h3018h32
XD18h3218h40
XD18h4018h42
XD18h4218h48
XD18h4819h00
LD19h1019h13
LD19h1319h16
LD19h1619h20
LD19h2019h24
LD19h2419h37
LD19h3719h50
LD19h5019h55

 

I tried to make a group by of a group by but I don't understand how to do it. 

 

Thanks for your help,

 

Don 

2 Replies

  • DonPepe , new column in power query

    if [Start] < time(19,00, 00)  then Text.Replace([Type], "0", "XD") else Text.Replace([Type], "0", "LD")

    • DonPepe's avatar
      DonPepe
      Icon for Helper II rankHelper II

      Hi amitchandak ,

       

      Yes but in fact I have plenty of other records with different hours. 

      That's why I thought about group by in a group by. 

      Or maybe use the Rank + merge methode...