cancel
Showing results for 
Search instead for 
Did you mean: 

UD8 Dynamic Calc - Aggregate Entities

pscrisp
New Contributor

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!

 

1 ACCEPTED SOLUTION

wnindl
New Contributor II

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-...

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

 

View solution in original post

5 REPLIES 5

Did you try using a where clause for text1?

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. 

mroscelli
New Contributor II

Hi @pscrisp 

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

rhankey
New Contributor II

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.

wnindl
New Contributor II

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-...

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