Forum Discussion
Histogram using birthday dates
- 10 years ago
Oh yeah my bad, forgot that was illegal. How's:
CountDOB = COUNTROWS(FILTER(Sheet1, DATEDIFF(Sheet1[DOB], TODAY(), YEAR) >= MIN('HistAges'[AgeLowerBound]) && DATEDIFF(Sheet1[DOB], TODAY(), YEAR) <= MAX('HistAges'[AgeUpperBound'])))
thanks jahida,
I created the new table as described. And have the following measure...
CountDOB = CALCULATE(COUNTROWS(Sheet1), DATEDIFF(Sheet1[DOB], TODAY(), YEAR) >= MIN('HistAges'[AgeLowerBound]), DATEDIFF(Sheet1[DOB], TODAY(), YEAR) <= MAX('HistAges'[AgeUpperBound]))
Sheet1[DOB] = Birthday in date format
HistAges'[AgeLowerBound] = column within the new table for lower age boundry
'HistAges'[AgeUpperBound] = column within new table for upper age boundry
However the measure returns the following error. "A function 'MIN' has been used in a True/False expression that is used as a table filter expression. This is not allowed"
Any ideas? thanks in advance for your help.
Oh yeah my bad, forgot that was illegal. How's:
CountDOB = COUNTROWS(FILTER(Sheet1, DATEDIFF(Sheet1[DOB], TODAY(), YEAR) >= MIN('HistAges'[AgeLowerBound]) && DATEDIFF(Sheet1[DOB], TODAY(), YEAR) <= MAX('HistAges'[AgeUpperBound'])))
- Anonymous10 years agoNot applicable