Forum Discussion
Creating Range for Age Groups
- 3 years ago
hi inglexjc ,
create a table as follows:
table code:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45Wiik1MDBONlTSUQJhAxDWs4QDpVidaCVDXVOgsBFUiQm6tKmuIUibMRCD1FliaDfQBmkDaTcAEwigFBsLAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Band = _t, Order = _t, Min = _t, Max = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Band", type text}, {"Order", Int64.Type}, {"Min", Int64.Type}, {"Max", type number}})
in
#"Changed Type"______
create a measure:
Count Age = VAR __AgeBandMin = SELECTEDVALUE('Table'[Min] ) VAR __AgeBandMax = SELECTEDVALUE('Table'[Max] ) return CALCULATE( COUNT(Table2[Age]), Legal Files[Age] >= __AgeBandMin, Legal Files[Age] <= __AgeBandMax )Appreciate a thumbs up if this helped.
Please accept this as the solution if your query is resolved.
Creating clear age ranges really helps bring structure and fairness to any system that categorizes people or data. When ranges are thoughtfully defined, it becomes much easier to analyze trends, compare outcomes, and ensure consistency across different scenarios. I’ve seen similar principles applied effectively in record organization, especially when reviewing Durham Court Cases alongside demographic details. Overall, a well-planned range framework makes information more accessible and decision-making more reliable.