Skip to main content
Member
March 14, 2022
Solved

UD8 Dynamic Calc - Aggregate Entities

  • March 14, 2022
  • 4 replies
  • 1 view

Hello - Is there a way to have a Ud8 dynamic calc sum up certain entities based on a text field? I am trying to tag a text field on certain entities and have a dynamic calc aggregate the entities based on what that text is.

Example: 

entity 1 - text 1 "abc"

entity 2 - text 1 "abc"

entity 3 - text 1 "def"

I want the value of entity 1 + entity 2

 

Thank you!

 

Best answer by WernerN

I am on the same team.  I found the solution here:
https://community.onestreamsoftware.com/t5/Office-Hours/Question-Is-there-a-way-to-report-the-total-of-a-group-of/ta-p/1268

Thank you Partner Enablement Team for this post.  It is a very helpful and very, very educational solution!

 

4 replies

Newcomer
March 14, 2022

Did you try using a where clause for text1?

pscAuthor
Member
March 14, 2022

I thought about that for a cube view potentially, but I'm not sure how to use a where clause on a dynamic calc? The few attempts I made at using where came out with an invalid script error. 

OneStream Employee
March 14, 2022

Hi psc 

I have not done it with a dynamic calc, but in the past I have succesfully used an Attribute Member on UD8 configured to pick up a text on entities, and then used it in combination with C#Aggregated 

mroscelli_0-1647289907279.png

To do it completely dinamically with a dynamic calc, as it goes across different data units, it would probably require access to databuffers in a loop (which is not a best practice as far as I am aware!)

 

hope this helps

Michele

Newcomer
March 15, 2022

You will need to loop through the desired list of members that was derived with an appropriate where Text Contains abc clause.  Within the loop, get the data cell you want for the entity, and accumulate that to a running total.

WernerNAnswer
Contributor
March 16, 2022

I am on the same team.  I found the solution here:
https://community.onestreamsoftware.com/t5/Office-Hours/Question-Is-there-a-way-to-report-the-total-of-a-group-of/ta-p/1268

Thank you Partner Enablement Team for this post.  It is a very helpful and very, very educational solution!