Forum Discussion
lastnn30
4 years agoPost Patron
Creating age groups
Hi I have list of ages (18-60) and I want to group them like (by 10) 18 - 28 29 - 39 40 - 50 51 - 60 I want to use PowerBI not Power Query. I tried to create Bin or List but I did not get i...
- 4 years ago
lastnn30
Create a table as follows names Band Table
Create a measure count the ages:Count Age = VAR __AgeBandMin = SELECTEDVALUE('Band Table'[Min] ) VAR __AgeBandMax = SELECTEDVALUE('Band Table'[Max] ) return CALCULATE( COUNT(Table2[Age]), Table2[Age] >= __AgeBandMin, Table2[Age] <= __AgeBandMax )
Result
The file is attached below my signature - 4 years ago
Thank you so much indeed.
Fowmy
4 years agoSuper User
lastnn30
Create a table as follows names Band Table
Create a measure count the ages:
Count Age =
VAR __AgeBandMin = SELECTEDVALUE('Band Table'[Min] )
VAR __AgeBandMax = SELECTEDVALUE('Band Table'[Max] )
return
CALCULATE(
COUNT(Table2[Age]),
Table2[Age] >= __AgeBandMin,
Table2[Age] <= __AgeBandMax
)
Result
The file is attached below my signature
lastnn30
4 years agoPost Patron
Thank you so much indeed.