I have crossposted this at mrexcel. https://www.mrexcel.com/forum/power-...me-values.html

I have a data table and a lookup table but for 2 lookups the values are incorrect and I don't know why? I am calculating the 1-5 and 6-15 measures in the same way that I calculate the rest of the measures that are correct.

In the picture below, the lookups are correct for 0 and all the rest of the lookup values but not for 1-5 and for 6-15?

The correct value for 1-5 should be 4045 and the correct value for 6-15 should be 5235.

The table have a relationship but it seems like the relationship doesn't work for 1-5 and for 6-15?

Could it have something to do with sorting order? All suggestions are welcome.

powerpivot.jpg

I have a data table and a lookup table but for 2 lookups the values are incorrect and I don't know why? I am calculating the 1-5 and 6-15 measures in the same way that I calculate the rest of the measures that are correct.

In the picture below, the lookups are correct for 0 and all the rest of the lookup values but not for 1-5 and for 6-15?

The correct value for 1-5 should be 4045 and the correct value for 6-15 should be 5235.

The table have a relationship but it seems like the relationship doesn't work for 1-5 and for 6-15?

Could it have something to do with sorting order? All suggestions are welcome.

Code:

**1-5**

**6-15**

16-19

20-29

30-39

40-49

50-64

65-74

75-79

80-89

90-w