How to split my report into groups with custom conditions

Use Kreo's Splitting Mechanism for this purpose.

Why do you need to use it?

Kreo’s Splitting Mechanism helps a user to quickly filter elements from your breakdown according to some particular condition/parameter and to get a report based on this filtering within several clicks, where condition is a formula, applicable to each element which corresponds to the applied filter. Each unique response to this formula forms a separate group in a report based on a template.

Follow these 5 quick steps to use the Splitting Mechanism:

1. Create a Custom Filter
2. Create a new Template 
3. Drag & drop your filter to the appropriate group of the template.
4. Add a new column and name it “Splitter”
N.B! Splitter is an obligatory name. You can’t change it!
5. Insert the appropriate condition(s) in the “Splitter” column on the group level.
6. Create a report based on this template. 
N.B! When you use a Base Extractor in your formula, it needs to have been added in the Breakdown Table first! 
N.B! When you add a Shared Parameter in the formula, insert its name in the same way as it's used in your model's breakdown. 

Rules for inserting conditions:

- Start inserting conditions with the sign “=”
- Use “;” to divide separate conditions from each other
- Insert text in “ “ , e.g.: “level 1”
- Insert the column’s name in “[ ]”, e.g.: [Net Area]

General Examples:

1. Let’s imagine, we need to divide columns according to their height into the following groups:

< 3000 mm
3000 - 4500 mm
4500 - 6000 mm
Then we need to insert the following condition: ="Concrete columns: " + (Range(Convert([Length]; mm); 3000; 4500; 6000)) + " mm", what means firstly we’re converting the Length column into mm using the Convert option, secondly we’re dividing elements into the relevant groups using the Range option, then inserting " mm". Finally, we're adding the result to the "Concrete columns: ". The result will be the following: Concrete columns: <3000 mm

2. Let’s imagine, we need to divide pile caps according to their length and width into the following groups:

150 mm x 150 mm
200 mm x 200 mm
350 mm x 350 mm
500 mm x 500 mm
Then we need to insert the following condition: =Concatenate(Nearest(v(Convert([VerticalBB.SectionMaxDimension];mm);Convert([VerticalBB.SectionMinDimension]; mm)); v(150;150); v(200;200);v(350;350);v(500;500)); " mm x "; " mm"), what means firstly we’re converting the VerticalBB.SectionMaxDimension and VerticalBB.SectionMinDimension Base Extractors’ columns into mm using the Convert option, secondly we’re putting them into vector using the option “v”, then we’re calculating the nearest pair for this vector with the help of the “Nearest” option. Finally, we’re inserting " mm x " and " mm" using the option “Concatenate”.

Watch our detailed tutorial on how to use Kreo's splitting mechanism:


Advanced possibilities provided by the Splitting Mechanism:

1. Mathematical calculations:

The following operations are supported by Kreo: “+”, “-”, “*”, “/”, “^” , eg.: [Net Area] + 3 * [Length]

Kreo also supports the following functions:

- Min(value1; value2;...) to find the minimum value out of several ones, e.g.: =Min([Net Area]; [VerticalBB.Height] * [VerticalBB.SectionMaxDimension])
- Max(value1; value2;...) to find the maximum value out of several ones, e.g.: =Max([Net Area]; [VerticalBB.Height] * [VerticalBB.SectionMaxDimension])
- Average(value1; value2;...) to find the average value of several ones, e.g.: =Average([Net Area]; [VerticalBB.Height]; [VerticalBB.SectionMaxDimension])
- Sum(value1; value2;...) to find the sum of several values. Its equivalent is: value1 + value2 + ...
E.g.: =Sum([Net Area]; [VerticalBB.Height]; [VerticalBB.SectionMaxDimension])

2. Rounding:

- Round(value) to round the value to 2 decimal places, e.g.: if Net Area = 1.1588, then =Round([Net Area]) is 1.16
- Round(value, digits) to round the value to a certain number of digits, e.g.: if Net Area = 1.1588, then =Round([Net Area]; 3) is 1.159
- RoundDown(value) to get rid of a decimal part, e.g.: if Net Area = 1.1588, then =RoundDown([Net Area]) is 1
- RoundUp(value) to get the minimum integer that is greater than or equal to the passed value, e.g.: if Net Area = 1.1588, then =RoundUp([Net Area]) is 2
- RoundEps(value, step) to round the number to a multiple of the specified step, e.g.: if Net Area = 1.1588, then =RoundEps([Net Area]; 0,05) is 1,15 (multiple of 0.05)

3. Logical:

- Logical operations AND, OR are also supported by Kreo, e.g.:
IF(logical expression; value if true; value if false)

Pay attention to the following examples:
- IF([Net Area] < 10; “less than 10”; “bigger than 10”), if Net Area is equal to 6, then the result is “less than 10”
- IF([Net Area] < 10; 10; IF([Net Area] < 20; 20; 30)) - the result is 10, 20 or 30, depending on what range the Net Area is in
- IF([Net Area] < 10 AND [Net Volume] >= 12; “Type A”; ”Type B”), if Net Area is equal to 6 and Net Volume is 11, than the result is ”Type B”
N.B! Both the “value if true” and “value if false” should have the same type, i.e. text or numerical one.

4. Text:

*The following values are used in the examples:

Length = 1.3,
Net area = 2.2,
Storey = Level 1
Category = Wall

- Search(required text; within text) to find the relevant text within some particular place. Result will be true or false. This option should be used within IF to check the specified condition, e.g.: if ElementType = Reinforced Round Column 300 mm diameter, then =IF(Search([ElementType]; “round”; [diameter] ^ 2 * 3.14 / 4; [width] * [height]), where Result is the column’s Section Area
- v(param1; param2;...) to combine several numbers into a vector (pair, triple, etc), e.g.: v([VerticalBB.Height];[VerticalBB.SectionMaxDimension]) or v(2;4)
- value + text OR Concatenate(value; text) to add the text to the numerical value, e.g.: =[Length] + “m length”. Result: 1.3 m length
- text1 + text2 + ... OR Concatenate(text1; text2, ...) to glue together two different texts, e.g.: =[Category] + “ on ” + [Storey], Result: Wall on Level 1.
- Concatenate(v(...)) to glue the vector (with a “,” as a divider), e.g.: =Concatenate(v([Length];[NetArea])), Result: 1.3, 2.2
- Concatenate(v(...); text1; text2; ...) is a specific vector’s gluing, where each text is added after each value from the vector, e.g.: =Concatenate(v([Length];[NetArea]); “ m, ”; “ m2”) Result: 1.3 m, 2.2 m2

N.B! You can also use only text1, e.g.: =Concatenate(v([Length];[NetArea]); “ x ”), Result: 1.3 x 2.2

- Join(text divider; text1; text2; …) to glue together a string with a divider, e.g.: =Join(“ on the ”; [Category]; [Storey])), Result: Wall on the Level1
- Join(text divider; v(...)) to glue together a vector with a divider, e.g.: =Join(“ x “, v([Length];[NetArea])), Result: 1.3 x 2.2

5. Range:

- Range(value; range1,; range2; range3;...) - the system accepts range1...rangeN as segments and finds which range the value falls into.
There’s the option RangeRight to control in what segment the value appears, when value = rangeN

Example:
Range([Net Area]; 1; 2; 3)

*If Net Area = 0.5, then result is < 1
If Net Area = 1.5,then result is 1 - 2
If Net Area = 3, then result is 2 - 3, N.B! If we use RangeRight([Net Area]; 1; 2; 3), then with Net Area = 3, the result is >3

6. Nearest:

- Nearest(value; value1; value2; value3;...) to find the nearest value

Example:
Nearest([Net Area]; 1;2;3)
*If Net Area = 1.3, then result is 1
If Net Area = 1.5, then result is 1 (as 1 and 2 are equal, the system takes 1 as the minimal inserted value)

- Nearest(v(...); v(...); v(...); ...) to find the nearest vector

Example:
Nearest(v([Length]; [Width]); v(200; 200); v(300; 300))
*If Length = 220 and Width = 250, then the result is v(200; 200)

7. Units:

This option is used to convert units of measurement.

The following value is used in the example:
Length = 1.115 m

- Convert(value, unit) to convert the value to the required unit of measurement, where the result is a number, e.g.: =Convert([Length]; mm) * 0.5, Result: 557.5
- ConvertS(value, unit) to convert the value to the required unit of measurement with formatting, where the result is a number rounded to 2 digits with the unit of measurement, e.g.: =ConvertS([Length] * 0.5, mm), Result: 557.5 mm
- ConvertS(value, unit, digits) to convert the value to the required unit of measurement with formatting and the possibility to control rounding, e.g.: =ConvertS([Length] * 0.5, mm, 0), Result: 558 mm

The following units of measurements are supported by Kreo:

Length:
M - meter
CM - centimeter
MM - millimeter
IN - inch
YD - yard

Area:
M2 - square meter
IN2 - square inch
FT2 - square foot
YD2 - square yard

Volume:
M3 - cubic meter
IN3 - cubic inch
FT3 - cubic foot
YD3 - cubic yard

Mass:
KG - kilogram
T - metric ton
LB - pound or pound-mass
LT - long ton (weight ton or Imperial ton)
ST - stone
TON - short ton
CWT - short hundredweight

8. Other:

- Value(text) to convert a string to a value. This option is important, when the column is a shared parameter, since any value in it is considered as a string by default, e.g. Kreo specifies the Width column as text, then in such a case =[Width] * 0.5 is invalid, while =Value([Width]) * 0.5 is the right one.