Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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?
Solved! Go to Solution.
@Anonymous
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>>)))
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!
@Anonymous
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>>)))
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 🙂
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 🙂
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
99 | |
76 | |
73 | |
49 |
User | Count |
---|---|
146 | |
108 | |
106 | |
90 | |
62 |