Forum Discussion
SantiViMa
3 years agoNew Member
Assign Table Value based on min and max values
Hello everyone,
On the one hand I have a table with the volume of a series of packages that I read from one source:
| ID_Package | Volume[m3] |
| 926 | 11,87 |
| 1032 | 4,56 |
| 1274 | 8,69 |
| 1248 | 30,02 |
| 1215 | 17,14 |
| 1266 | 45,32 |
On the other hand I have different cattegories of packages based on minium and maximum volumes:
| Volume_Min | Volume_Max | Package_Type_per_Volume |
| 0 | 2,5 | < 2,5 M3 |
| 2,5 | 7,5 | 2,5-7,5 M3 |
| 7,5 | 15 | 7,5-15 M3 |
| 15 | 30 | 15-30 M3 |
| 30 | 50 | 30-50 M3 |
| 50 | 99999 | >50 M3 |
Is there any way to include the "Package_Type_per_volume" info in the first table without using "IF" conditions? This second table can be easily modified and if I use IF conditions I will need to modify it each time I change the scale. The idea would be to get this table:
| ID_Package | Volume[m3] | Package_Type_per_Volume |
| 926 | 11,87 | 7,5-15 M3 |
| 1032 | 4,56 | 2,5-7,5 M3 |
| 1274 | 8,69 | 7,5-15 M3 |
| 1248 | 30,02 | 30-50 M3 |
| 1215 | 17,14 | 15-30 M3 |
| 1266 | 45,32 | 30-50 M3 |
Thanks in advance!
2 Replies
- johnt75
Super User
Have a look at https://www.daxpatterns.com/static-segmentation/
- SantiViMaNew Member
Thanks, I will but it looks like it could work!