Forum Discussion
Anonymous
7 years agoNot applicable
Lookupvalue value between two values
Hi all, In one table I have the Age of IDcontacts, and in another table I have AgeRanges such as : Id AgeFrom AgeTo Description 1 0 10 0-10 2 11 20 11-20 3 21 30 21-...
- 7 years ago
Anonymous Please try this as a "New Column"
Assuming you age descriptions in a separate table and you want to retrieve the age description into another table based on the age.
AgeDesc = CALCULATE(VALUES(Test123Lkp[Description]),FILTER(Test123Lkp,Test123Data[Age]>=Test123Lkp[AgeFrom] && Test123Data[Age] <= Test123Lkp[AgeTo]))
- 7 years ago
Anonymous But if you see the screenshot that I've posted, it has age values like 25, 35 which are in between the age range but not as starting values. If you want to handle null values in age, then add another condition to exclude blank values.
AgeDesc = CALCULATE(VALUES(Test123Lkp[Description]),FILTER(Test123Lkp,Test123Data[Age]>=Test123Lkp[AgeFrom] && Test123Data[Age] <= Test123Lkp[AgeTo] && Test123Data[Age]<>BLANK()))
PattemManohar
7 years agoCommunity Champion
Anonymous Please try this as a "New Column"
Assuming you age descriptions in a separate table and you want to retrieve the age description into another table based on the age.
AgeDesc = CALCULATE(VALUES(Test123Lkp[Description]),FILTER(Test123Lkp,Test123Data[Age]>=Test123Lkp[AgeFrom] && Test123Data[Age] <= Test123Lkp[AgeTo]))
Anonymous
7 years agoNot applicable
It works nicely, thanks a lot!