Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
lastnn30
Post Patron
Post Patron

Creating age groups

Hi

I have list of ages (18-60) and I want to group them like (by 10)

18 - 28

29 - 39

40 - 50

51 - 60 

 

I want to use PowerBI not Power Query. I tried to create Bin or List but I did not get it right. Any idea please. Thank you so much

2 ACCEPTED SOLUTIONS
Fowmy
Super User
Super User

@lastnn30 

Create a table as follows names Band Table

Fowmy_0-1647758502194.png


Create a measure count the ages:

Count Age = 
VAR __AgeBandMin = SELECTEDVALUE('Band Table'[Min] ) 
VAR __AgeBandMax = SELECTEDVALUE('Band Table'[Max] )
return
CALCULATE(
    COUNT(Table2[Age]),
    Table2[Age] >= __AgeBandMin,
    Table2[Age] <= __AgeBandMax 
)


Result

Fowmy_1-1647758537159.png


The file is attached below my signature

 



 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

Thank you so much indeed.

View solution in original post

2 REPLIES 2
Fowmy
Super User
Super User

@lastnn30 

Create a table as follows names Band Table

Fowmy_0-1647758502194.png


Create a measure count the ages:

Count Age = 
VAR __AgeBandMin = SELECTEDVALUE('Band Table'[Min] ) 
VAR __AgeBandMax = SELECTEDVALUE('Band Table'[Max] )
return
CALCULATE(
    COUNT(Table2[Age]),
    Table2[Age] >= __AgeBandMin,
    Table2[Age] <= __AgeBandMax 
)


Result

Fowmy_1-1647758537159.png


The file is attached below my signature

 



 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Thank you so much indeed.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.