In Lucidchart there are a group of 5 shapes with the Custom Data properties "Type" and "Vol". A readout shape is analyzing the siblings.
- .siblings.Type = [A B B A]
- .siblings.Vol = [30 65 45 10]
I would like to:
- List the unique Types
- Sum the Vol for each Type
The summation can be performed using the Map Filter and Sum functions. For example the hardcoded summation for Type "A" is
- "All A" = [30 10] = (Map("A"x=>filter(siblingsthis."Type"=x))."Vol"
- 40 = sum(@."All A")
What I am missing is the ability to generate the unique array of Type to replace the hardcoded ["A""B"] with an expression.
- "Sorted Vol" = [[3010][6545]] = Map(["A" "B"] x=>filter(siblingsthis."Type"=x))."Vol"
- [40110] = map(@"Sorted Vol"x=>sum(x))
Has anyone created a formula to do this?