Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Combine Values into groups

Hello,

 

We have a table containing "Job ID", "Job Type" and "Revenue" (and a lot more - not important).

The problem is we have 30+ job types, and we would like to put them into 4 groups.

 

The goal is to look at revenue per job type - so instead of revenue per 30+ job types, we would like to see the revenue per 4 combined types.

 

So lets say Job type 1-10 Should belong to "Jop Type A", Job type 11-20 should be "Job Type B" etc.

 

Is there an easy way for us to do that in this huge data table?

 

Thanks!

7 Replies

  • PattemManohar's avatar
    PattemManohar
    Community Champion

    Anonymous  Please post sample test data to suggest an accurate solution. But from the lines of your requirement, I suggest to create a Rank field which will give you the rank based on their Revenue and then use this Rank field to create a groups using DAX

    • Anonymous's avatar
      Anonymous
      Not applicable

      Sample data:

       

      Job IDJob TypeRevenueNEW
      1Banana10Fruit
      2Apple4Fruit
      3Grape10Fruit
      4Red100Wine
      5White200Wine
      6Rosé150Wine
      7Red100Wine
      8Banana10Fruit
      9Apple10Fruit
      10Grape10Fruit
      11T-shirt200Clothes
      12Pants230Clothes
      13Pants250Clothes
      14T-shirt200Clothes
      15Banana10Fruit
      16Apple5Fruit
      17Grape7Fruit
      18Red120Wine
      19White200Wine
      20Rosé350Wine
      21Banana10Fruit
      22Apple5Fruit
      23Grape5Fruit
      24T-shirt100Clothes
      25Pants250Clothes

       

      So the "NEW" column is how I think it could be :)

      • PattemManohar's avatar
        PattemManohar
        Community Champion

        Thanks Anonymous  for sample data. 

         

        Is NEW column is your expected output ? or that is what need to considered for JobType to calculate Revenue - Please confirm.