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...
vanessafvg
6 years agoCommunity Champion
grggmrtn what is the structure of your data and how would you be calling this, if you can give me a sample of your data that would be useful, or dummy data
grggmrtn
6 years agoPost Patron
Hi vanessafvg
The structure is just about as complicated as they come, but I'll try and explain the minimum...
We have a "factless" fact table, that's related to all dimensions by a common key (many to one, bidirectional). For example:
Fact_table has columns KEY_Customer and KEY_Date.
Dim_Customer has columns KEY_Customer, CustomerID, Birthday, Gender.
Dim_Date has columns KEY_Date
I also have my main [date] table written in DAX (Calenderauto()) which is related to Dim_Date (one to one, bidirectional) which I use to slice the data.