Forum Discussion

kalyani's avatar
kalyani
Helper I
7 years ago

Pivot columns using grouping another column

Hi,

 

I need your help in the below scenario, not sure if there is a possibility to achieve this in PBI.

 

Here is my table;

 

I have to group by Batch and Check the Code, if the code other than "X" then the Status should be Complete, if there is atleast one record wiith "X" then the Status should be Cancelled. If, I can transform the table like the below, I can able to get the status column used in my further actions. 

 

 

Can anyone hlep, please

 

Regards

Kals

 

 

2 Replies

  • v-piga-msft's avatar
    v-piga-msft
    Resident Rockstar

    Hi kalyani,

     

    By my tests, I'm afraid that we may not achieve your desired output based on your original table strature in Power BI .

     

    As the workaround, you could create the matrix like below.

     

     

    Best Regards,

    Cherry

    • kalyani's avatar
      kalyani
      Helper I

      Hi Cherry, Thank you for your response. Yeah, even I tried creating the matrix, but the table we are trying to create can be used as a input for subsequent analysis and charts.. So, matrix won't help in this case.

       

      Regards

      Kals