Forum Discussion
grggmrtn
6 years agoPost Patron
Relative age?
Hey everyone. So, I've calculated the age of my "customers" by a simple dax: Age =
DATEDIFF(
MAX(Dim_Customer[Birthday]);
TODAY();
YEAR
) and it, of course, works perfect...
Anonymous
6 years agoNot applicable
Can you share how the age grouping is done?
grggmrtn
6 years agoPost Patron
Anonymoussure:
Age group =
SWITCH(
TRUE();
[Age] < 20; "19 (and under)";
[Age] < 25; "20-24";
[Age] < 30; "25-29";
[Age] < 35; "30-34";
[Age] < 40; "35-39";
[Age] < 45; "40-44";
[Age] < 50; "45-49";
[Age] < 55; "50-54";
[Age] < 60; "55-59";
[Age] < 65; "60-64";
[Age] < 70; "65-69";
[Age] < 75; "70-74";
[Age] < 80; "75-79";
[Age] < 85; "80-84";
[Age] < 90; "85-89";
"90 (or over)"
)- vanessafvg6 years agoCommunity Champion
grggmrtn ok so just so that i understand what you asking
you want to take the year (sales year?) and work out how old they were in that year?
- grggmrtn6 years agoPost Patron
vanessafvgYes, exactly. I want to take the current year (not sales year) and find out how many customers there were in each age group - their age at that time.
- grggmrtn6 years agoPost Patron
This is what I'm going for - just with "age group" instead of what's currently there.
- vanessafvg6 years agoCommunity Champion
grggmrtn apologies but im struggling to understand what you looking for, surely it should be easy to get the age of the current year with a count? i dont quiet understand your challenge apologies if i am understanding you incorrectly
can you demonstrate what you expecting your visual to look like