Forum Discussion
Calculating Age
never mind...
I haven't been sure, If the problem is that there are different dates in the form dd.mm.yyyy so I created a calculated collum:
year_solo = year(Pivot[date])
then i created this measure:
age= datediff(min('Schläge'[year1]);min(Pivot[year_solo]);DAY)
I still have no clue, why I have to use DAY, but thats why It hasn't been working ;)
- Anonymous9 years agoNot applicable
Hi Anonymous,
Based on this official article, when using DATEDIFF function, we should specify scalar datetime value as start_date .
DATEDIFF(<start_date>, <end_date>, <interval>)
In your scenario, 'Schläge'[year1] column contains numeric value rather than datetime value, you would need to use the following formula to calculate age.
age= min('Schläge'[year1])- min(Pivot[year_solo])
Thanks,
Lydia Zhang