Forum Discussion

TristanKuesters's avatar
TristanKuesters
Icon for Resolver I rankResolver I
10 years ago
Solved

Group row data and add as a new column

Hello everybody,   if have the following example:   Source Table   Order No - Amount - Group 1000 - 100€ - A 2000 - 200€ - A 3000 - 400€ - B   The result should be a table like this: Orde...
  • ankitpatira's avatar
    10 years ago

    TristanKuesters What I would suggest easiest option would be is to go to power bi desktop query editor -> right click your original query and click Reference. This would create another query that is referenced original. Then for the second group do Group By via Transorm tab that will give you sum of Amount by Group. Close&Apply and then create relationship between two queries using Group column. 

     

    So you will end up with query that is grouped by sum of amount like how you wanted and you will also have original query that also contains order number column.