Question

Generate incremental start/end range table

  • 27 March 2020
  • 1 reply
  • 2 views

I have the following table:

Borehole_IDFinal_Depth243446575523452.5

 

I need to generate incremental Start/End (start from 0) ranges table based on unique values in Borehole_ID and the end values from Final_Depth. Something similar to table as below..

Borehole_IDFinal_Depth_RoundDownFinal_Depth_RoundUp243401243412243423243434657501657512657523657534657545234501234512234523

 

@takashi


1 reply

Badge +2

Hi @vupathy,

You can get this done with a Cloner and AttributeManager.

Add a Cloner and set the Number of Copies attribute to Final_Depth and set the Copy Number Attribute to Final_Depth_RoundDown. Note: The copy number is an optional attribute that starts counting from 0 (you could leave this blank and use a Counter if you wanted to start the count at a different number).

0684Q00000ArKNnQAN.png

Add an AttributeManager after the Cloner to create the Final_Depth_RoundUp attribute and set the value of Final_Depth_RoundUp using the arithmetic editor from the drop down menu. Set the value to @Value(Final_Depth_RoundDown)+1 in the arithmetic editor or paste in the following expression into the Attribute Value:

@Evaluate(@Value(Final_Depth_RoundDown)+1)

0684Q00000ArKTaQAN.png

You can also remove the Final_Depth attribute in the AttributeManager to give you the output you are looking for.

Hope that helps!

Increment_Example.fmwt

Reply