Hi!
I am trying to get the right segment in a caculated column using this pattern :
Static Segmentation – Dax Patterns
My problem is that my ranges are not the same for every type of vehicules.
Unit
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]UnitNum[/TD]
[TD]Type[/TD]
[TD]Age[/TD]
[TD]Segment[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]Pickup[/TD]
[TD]2[/TD]
[TD]?[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]Pickup[/TD]
[TD]6[/TD]
[TD]?[/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD]Truck[/TD]
[TD]12[/TD]
[TD]?[/TD]
[/TR]
[TR]
[TD]D[/TD]
[TD]Truck[/TD]
[TD]8[/TD]
[TD]?[/TD]
[/TR]
[TR]
[TD]E[/TD]
[TD]Pickup[/TD]
[TD]1[/TD]
[TD]?[/TD]
[/TR]
[TR]
[TD]F[/TD]
[TD]Truck[/TD]
[TD]1[/TD]
[TD]?[/TD]
[/TR]
</tbody>[/TABLE]
Segment
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Type[/TD]
[TD]Segment[/TD]
[TD]Min Age[/TD]
[TD]Max Age[/TD]
[/TR]
[TR]
[TD]Pickup[/TD]
[TD]New[/TD]
[TD]0[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]Truck[/TD]
[TD]New[/TD]
[TD]0[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]Pickup[/TD]
[TD]Middle[/TD]
[TD]2[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]Truck[/TD]
[TD]Middle[/TD]
[TD]3[/TD]
[TD]9[/TD]
[/TR]
[TR]
[TD]Pickup[/TD]
[TD]End[/TD]
[TD]4[/TD]
[TD]9999[/TD]
[/TR]
[TR]
[TD]Truck[/TD]
[TD]End[/TD]
[TD]9[/TD]
[TD]9999[/TD]
[/TR]
</tbody>[/TABLE]
Thank you!
I am trying to get the right segment in a caculated column using this pattern :
Static Segmentation – Dax Patterns
My problem is that my ranges are not the same for every type of vehicules.
Unit
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]UnitNum[/TD]
[TD]Type[/TD]
[TD]Age[/TD]
[TD]Segment[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]Pickup[/TD]
[TD]2[/TD]
[TD]?[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]Pickup[/TD]
[TD]6[/TD]
[TD]?[/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD]Truck[/TD]
[TD]12[/TD]
[TD]?[/TD]
[/TR]
[TR]
[TD]D[/TD]
[TD]Truck[/TD]
[TD]8[/TD]
[TD]?[/TD]
[/TR]
[TR]
[TD]E[/TD]
[TD]Pickup[/TD]
[TD]1[/TD]
[TD]?[/TD]
[/TR]
[TR]
[TD]F[/TD]
[TD]Truck[/TD]
[TD]1[/TD]
[TD]?[/TD]
[/TR]
</tbody>[/TABLE]
Segment
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Type[/TD]
[TD]Segment[/TD]
[TD]Min Age[/TD]
[TD]Max Age[/TD]
[/TR]
[TR]
[TD]Pickup[/TD]
[TD]New[/TD]
[TD]0[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]Truck[/TD]
[TD]New[/TD]
[TD]0[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]Pickup[/TD]
[TD]Middle[/TD]
[TD]2[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]Truck[/TD]
[TD]Middle[/TD]
[TD]3[/TD]
[TD]9[/TD]
[/TR]
[TR]
[TD]Pickup[/TD]
[TD]End[/TD]
[TD]4[/TD]
[TD]9999[/TD]
[/TR]
[TR]
[TD]Truck[/TD]
[TD]End[/TD]
[TD]9[/TD]
[TD]9999[/TD]
[/TR]
</tbody>[/TABLE]
Thank you!