Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Static Grouping in-between value

Hi All,   I'm having a bit of trouble grasping static grouping in DAX. I have 2 tables 1) Age grouping From    To       Age group -1 0 A (0) 1 2 B (1-2) 3 5 C (3-5) 6 10 D (6...
  • johnt75's avatar
    3 years ago

    Try

    Age group =
    VAR ReferenceAge = 'Table 2'[Age]
    RETURN
        SELECTCOLUMNS (
            FILTER (
                'Table 1',
                'Table 1'[From] <= ReferenceAge
                    && 'Table 1'[To] >= ReferenceAge
            ),
            "@val", 'Table 1'[Age group]
        )