I’m a beginner with DAX and Power BI. I want to know how you would handle problems like this:
I have two tables; Table A with all my objects and characteristics (e.g. construction year or rental income per month). And Table B a “lookup table” where the boundaries for that class are.
Based on my characteristics, I want to bin/class the building in a calculated column (“Rental class”). So if the rental income is €423 it's under class 1 and if the rental income is €608 it's under class 4
Table A
Building Construction_year Rental_income
B1 2016 €423
B2 1995 €650
B3 1949 €720
Table B
Rental_class Rental_boundary
Under_class_1 €424
Under_class_2 €607
Under_class_3 €651
Under_class_4 €720
This would be my expected result
Building Construction_year Rental_income Rental_class
B1 2016 €423 Under_class_1
B2 1995 €650 Under_class_3
B3 1949 €720 Under_class_4
In Excel, I would use VLOOKUP (TRUE), but in DAX I don’t know how to handle this problem.
This situation happens a lot in my data.