Forum Discussion

naiconn1981's avatar
naiconn1981
Regular Visitor
8 years ago
Solved

Newb Question on table ranging

Hi   I'm completely new to Power BI and have been playing around with it, but having trouble grouping specific data.     I like to create a table where I can group specific age range.  For exampl...
  • v-frfei-msft's avatar
    8 years ago

    Hi naiconn1981,

     

    We can create the measures as below.

     

    Sony 10-18 = CALCULATE(COUNTROWS(Table1),FILTER(ALL(Table1),Table1[Console]="Sony" && Table1[Player's Age]>=10 && Table1[Player's Age]<=18))
    Sony 19-27 = CALCULATE(COUNTROWS(Table1),FILTER(ALL(Table1),Table1[Console]="Sony" && Table1[Player's Age]>=19 && Table1[Player's Age]<=27))
    Sony 28-36 = CALCULATE(COUNTROWS(Table1),FILTER(ALL(Table1),Table1[Console]="Sony" && Table1[Player's Age]>=28 && Table1[Player's Age]<=36))
    Sony 37-42 = CALCULATE(COUNTROWS(Table1),FILTER(ALL(Table1),Table1[Console]="Sony" && Table1[Player's Age]>=37 && Table1[Player's Age]<=42))
    Sony 43+ = CALCULATE(COUNTROWS(Table1),FILTER(ALL(Table1),Table1[Console]="Sony" && Table1[Player's Age]>=43))

     

    For more details, please check the pbix as attached.

     

    https://www.dropbox.com/s/hd56qny81bc8232/Newb%20Question%20on%20table%20rangin.pbix?dl=0

     

    Regards,

    Frank