Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Members under Consolidation - duplicates #381

Closed
sootytm1 opened this issue Oct 1, 2020 · 3 comments · Fixed by #382
Closed

Members under Consolidation - duplicates #381

sootytm1 opened this issue Oct 1, 2020 · 3 comments · Fixed by #382
Labels

Comments

@sootytm1
Copy link

sootytm1 commented Oct 1, 2020

Not sure if I'm interpreting this command correctly or it's an issue:
When I use "get_members_under_consolidation", with a max dept of 1, the returned list includes duplicate leaves:
e.g. this consol_ele2 = tm1.elements.get_members_under_consolidation(tempdim, tempdim, "Total", 1, False)

returns:

['A', 'A1', 'A1', 'A2', 'A2', 'B', 'B1', 'B2', 'B2', 'B3', 'B3', 'C', 'C1', 'C1', 'C2', 'C2', 'D', 'B', 'C']

Capture

from the simple dim attached.
Thanks.

@rkvinoth
Copy link
Contributor

rkvinoth commented Oct 1, 2020

A quick workaround would be to use set

consol_ele2 = set(tm1.elements.get_members_under_consolidation(tempdim, tempdim, "Total", 1, False))

@sootytm1
Copy link
Author

sootytm1 commented Oct 1, 2020

A quick workaround would be to use set

consol_ele2 = set(tm1.elements.get_members_under_consolidation(tempdim, tempdim, "Total", 1, False))

Thanks - but there will be occasions where duplicates are part of the dimension, as in my example "B" and "C" have 2 parents.

@rkvinoth
Copy link
Contributor

rkvinoth commented Oct 1, 2020

yeah, I get that and I have created this PR #382
Check that out and let me know if things are as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants