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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

How to get breakdown of Customers (who have not ordered) by age range?

Hi all,

 

For example, I have a list of customers who have not placed an order and their birthdate.

 

Table1_Potential Customers

CustID     D.O.B. 

101          1975-01-01

102          1980-08-26

103          1982-08-15

 

How do I create a measure and/or visual that shows the breakdown of age ranges e.g. 21 - 30 years old, 31 - 40 years old, etc. of these customers?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@Anonymous 

@v-diye-msft 

 

Thank you for pointing me in the right direction!

 

I have tried the measure and found that changing the "&&" to "," works for me:

Age Group:= IF(AND(Table[Age]>=20, Table[Age]<=30),"21-30", IF(AND(Table[Age]>=30, Table[Age]<=40),"31-40",IF(AND(Table[Age]>=30, Table[Age]<=40),"41-50",<<ELSE CONDITION CONTINUES>>)))

View solution in original post

4 REPLIES 4
v-diye-msft
Community Support
Community Support

Hi @Anonymous 

 

I would suggest the solution same as Mvignesh53 ,  please kindly marked his answer as solution if it meets your requirement, or provide more details about your question if you'd like to get another suggestion.  thanks!

 

 

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
Anonymous
Not applicable

@Anonymous 

@v-diye-msft 

 

Thank you for pointing me in the right direction!

 

I have tried the measure and found that changing the "&&" to "," works for me:

Age Group:= IF(AND(Table[Age]>=20, Table[Age]<=30),"21-30", IF(AND(Table[Age]>=30, Table[Age]<=40),"31-40",IF(AND(Table[Age]>=30, Table[Age]<=40),"41-50",<<ELSE CONDITION CONTINUES>>)))
Anonymous
Not applicable

Hi,

 

Sure thing @Anonymous.

 

Best Regards,
Vignesh M

If what I suggested worked for you feel free to Drop a "Kudos" and Consider to "Accept as Solution" if I solved your Issue 🙂

 

Anonymous
Not applicable

Hi,

 

You would first have to Create a Measure which calculates their Ages. You need to Create this as a new Column in the Table.

Age:= DATEDIFF(DATE(YEAR(DOB),MONTH(DOB),DAY(DOB)),TODAY(),YEAR)

Once you have the new column named Age. You would need to Create another column to BIN this.

Age Group:= IF(AND(Table[Age]>=20 &&Table[Age]<=30),"21-30", IF(AND(Table[Age]>=30 &&Table[Age]<=40),"31-40",IF(AND(Table[Age]>=30 &&Table[Age]<=40),"41-50",<<ELSE CONDITION CONTINUES>>)))

Once you have both these columns, You need to bring in a Bar Visual into the Canvas and change the Calculation to Count under Values FIELD.

 

Best Regards,
Vignesh M

If what I suggested worked for you feel free to Drop a "Kudos" and Consider to "Accept as Solution" if I solved your Issue 🙂 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors