Forum Discussion

user_bi's avatar
user_bi
Frequent Visitor
2 years ago

Display data based on cell elements from one column

Hello, 

I have a dataset that has 8 columns 

below is the sample data :

codeMATRIXCDEMATRIXMATRIX_DESCSUBGROUPSUBGROUPNAMEPARAMETERCODEPARAMETERNAMETESTMETHOD
1001675ADMAdmixtureAdmixture (Civil)ChemicalP123xyzsite
1001544ADMAdmixtureChemicalChemicalP124ghjVisual
1001675ADMAdmixtureAdmixture (Civil)ChemicalP125lkjVisual
1001AIRAirMONITORINGMonitoring P126klDigital Meter
1001AIRAirMONITORINGMonitoring P127clVisual
1001AIRAirMONITORINGMonitoring P128clsite
1002849ANFANIMAL FEEDMETALSMonitoring P129znDigital Meter
1002849ANFANIMAL FEEDMETALSMETALSP130znVisual
1002847ANFANIMAL FEEDSUGAR PROFILESUGAR PROFILEP131frVisual

 

i want the data to be displayed for each MATRIX_DESC one after the other:

 

Admixture

PARAMETERCODEPARAMETERNAMETESTMETHOD
P123xyzsite
P124ghjVisual
P125lkjVisual

 

AIR

PARAMETERCODEPARAMETERNAMETESTMETHOD
P126klDigital Meter
P127clVisual
P128clsite

 

ANIMAL FEED

PARAMETERCODEPARAMETERNAMETESTMETHOD
P129znDigital Meter
P130znVisual
P131frVisual

 

How  can i achieve this format ? i have tried grouping the data by MATRIX_DESC but still cant display it. 

2 Replies

  • v-weiyan1-msft's avatar
    v-weiyan1-msft
    Community Support

    Hi user_bi ,

     

    Based on the sample and description you provided, Please try the following steps:

    1.In the Power Query Editor,click on 'Group By' on the Transform tab.

    2. Please Right-click on the table cell and select Add as New Query. You can rename the new query as needed.

    Next you can remove unnecessary columns as needed.

    Result is as below.

    In addition, you can also consider using the dax as follows.

    AdmixtureTable = FILTER('Table2','Table2'[MATRIX_DESC] = "Admixture")

    Result is as below.

     

    For further details,please find attachment.

     

    Best Regards,
    Yulia Yan

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • user_bi's avatar
      user_bi
      Frequent Visitor

      Hi v-weiyan1-msft 

       

      This sample contains only 3 different Matrix_desc but the original dataset has 200+, is there a better way to execute the above for 200+ parameters as grouping them individually would be very time consuming.

       

      Thank you in advance