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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.