Dynamic segmentation - Age Banding

Hi,

I have a DAX measure called Age that shows an Employees Age based on the selection value of the Year

I then wanted to create a Calculated Column to create an Age Banding based on the Measure Age
so I created the Calculated Column called Age Range but every value returning is showing -20.

I was then told to look at Dynamic Segmentation.

So based on this I created a new measure called Age 2 which in results lets me include the column Age Band that holds the Ranges I require.

The problem is when I select Year 2021 the Employment Id Emp06 is missing, when I select Year 2022 then the Employment Id Emp13 goes missing. The other years 2019 and 2020 shows all the Employees.

Any ideas what is going on? I think it has something to do with those Employment Id that go missing go into a different Age Band

Dynamic Calculate Age at point of time date selection v2.pbix (158.5 KB)

Thanks

1 Like

Hi @denwo1982 ,
Try to see if the following measure does what you are looking for:

Age Range_JAFP =

VAR _Age = [Age]

VAR _Result = CALCULATE(

    VALUES( 'Age Band Desc'[Age Band] ),

        FILTER(

          'Age Band Desc',

          'Age Band Desc'[Start] <= _Age &&

         'Age Band Desc'[End] >= _Age

        )

)

RETURN

_Result

Regards

Dynamic Calculate Age at point of time date selection v2_JAFP.pbix (158.8 KB)

Thanks, yes looks like i didn’t do the =equal to