Forum Discussion

OH's avatar
OH
Regular Visitor
8 years ago
Solved

How to best categorize data based on ranges

Hello all   Recently (some weeks ago) I entered the world of PowerBI for analyzing (big) data. When typing my subject I already read the proposed other articles but non of them really answered my ...
  • v-juanli-msft's avatar
    8 years ago

    Hi OH

    Assume you have a simple dataset with a column which shows the volume of a body.

    First you need create a new table by entering data to show the the Volume range

     

    Second in your dataset, create columns

    category num = IF([volumne]<=0.1,1,IF([volumne]<=0.2,2,IF([volumne]<=0.5,3,IF([volumne]<=1,4))))

    Next create relstionship between your dataset and new created table by [category num].

     

     

     

    Then create a column

     

    range = RELATED(Table1[category range])

     

     

    Best Regards

    maggie