findByTitle
The findByTitle function can be used when you want to find the values of the nodes with same name/title.
Syntax
findByTitle(searchString) - > [?]
Arguments
Arguments | Datatype | Description |
---|---|---|
searchString | Text / Number | Title to match the node name. |
Remarks
This function can only be used after refering a node for which this calculation needs to be done as shown below in the example.
Example
Consider a Scenario where you want add all the nodes with title "Apple Sales" & "Orange Sales". Below is the data of apple and orange sales made by different Suppliers.
Period | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec |
---|---|---|---|---|---|---|---|---|---|---|---|---|
Suppliers (Parent node) | 185800 | 192400 | 194000 | 182400 | 188000 | 206900 | 184900 | 186100 | 192500 | 188600 | 202650 | 190050 |
Supplier A | 55700 | 57900 | 60900 | 55900 | 59200 | 62100 | 56200 | 58600 | 59300 | 58300 | 61400 | 60300 |
Apple Sales | 24300 | 25300 | 25800 | 23300 | 27300 | 28400 | 21200 | 26900 | 25700 | 24200 | 28900 | 27300 |
Orange Sales | 31400 | 32600 | 35100 | 32600 | 31900 | 33700 | 35000 | 31700 | 33600 | 34100 | 32500 | 33000 |
Supplier B | 60400 | 61800 | 56600 | 56300 | 57300 | 60900 | 58700 | 58000 | 59000 | 62600 | 62800 | 60800 |
Apple Sales | 22500 | 22100 | 21800 | 23600 | 21900 | 22300 | 24200 | 24800 | 21700 | 25600 | 23400 | 22000 |
Orange Sales | 37900 | 39700 | 34800 | 32700 | 35400 | 38600 | 34500 | 33200 | 37300 | 37000 | 39400 | 38800 |
Supplier C | 69700 | 72700 | 76500 | 70200 | 71500 | 83900 | 70000 | 69500 | 74200 | 67700 | 78450 | 68950 |
Apple Sales | 43400 | 44300 | 46700 | 45300 | 43600 | 46900 | 44200 | 42800 | 45900 | 43800 | 47200 | 41000 |
Orange Sales | 26300 | 28400 | 29800 | 24900 | 27900 | 37000 | 25800 | 26700 | 28300 | 23900 | 31250 | 27950 |
To achieve this, the following formula should be written in the [Total Apple Sales] node:
SUM
(
[Suppliers]
.
DESCENDANTS
.
findbytitle
("
Apple Sales
")
Here we have mentioned the [Suppliers] node name before writing Findbytitle which means we are asking the function to go to the descendants of the Suppliers node and get the value under the title "Apple Sales".
Result
The function will add up all the Supplier's Apple Sales value and give it in the Total Apple Sales node.
Period | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec |
---|---|---|---|---|---|---|---|---|---|---|---|---|
Suppliers | 185800 | 192400 | 194000 | 182400 | 188000 | 206900 | 184900 | 186100 | 192500 | 188600 | 202650 | 190050 |
Total Apple Sales | 90200 | 91700 | 94300 | 92200 | 92800 | 97600 | 89600 | 94500 | 93300 | 93600 | 99500 | 90300 |
Last updated