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

Need Sample for XIRR py script arguments #16

Open
surdyed opened this issue Sep 29, 2022 · 7 comments
Open

Need Sample for XIRR py script arguments #16

surdyed opened this issue Sep 29, 2022 · 7 comments

Comments

@surdyed
Copy link

surdyed commented Sep 29, 2022

Team , Marius ,

There is no enough documentation or sample on how to calculate XIRR.
It would be helpful if you can update.

Thanks
Suresh

@surdyed surdyed changed the title Need Samples for XIRR Need Sample for XIRR py script arguements Sep 29, 2022
@surdyed surdyed changed the title Need Sample for XIRR py script arguements Need Sample for XIRR py script arguments Sep 29, 2022
@MariusWirtz
Copy link
Collaborator

Hi @surdyed,

the xirr function expects that date-elements are placed on the rows.

Make sure that in your source view the elements on the rows are dates (e.g. 2022-09-29 or 29/09/2022)

That should be it

Marius

@surdyed
Copy link
Author

surdyed commented Sep 29, 2022

Hi Marius ,

Tried with both date format suggested, here is the error.
I have added new date format with alias , saved with subset with alias on and assigned to source view.
However when executed the script ,its taking the dimension principal element name instead of alias field.

Please check and also let me know if you have tried this and its working as mentioned?

date None
Failed calculating XIRR with parameters {'tm1_source': 'srver1', 'tm1_target': 'srver1', 'cube_source': 'position cube', 'cube_target': 'position cube', 'view_source': 'z_test_IRR_20220928091911_861', 'view_target': 'Zerout_z_test_IRR_20220928091911_861', 'dimension': 'prj', 'hierarchy': 'prj'}. Error: object of type 'NoneType' has no len()
Traceback (most recent call last):

TypeError: object of type 'NoneType' has no len()
CubeCalc aborted. Duration: 0:00:01.639174.
CubeCalc aborted. Duration: 0:00:01.639174.

@MariusWirtz
Copy link
Collaborator

MariusWirtz commented Sep 29, 2022

please post a screenshot of the source view

I think the script always takes the principal element name. I think that's a limitation.
Can you create a sample where the element principle name is a valid date format?

@surdyed
Copy link
Author

surdyed commented Sep 29, 2022

Hi Marius ,
See attached.

View

I cannot change the base date format , as it would screw up all historicals (rules+ti code ref and all)
Only option is I can add alias as needed.

@surdyed
Copy link
Author

surdyed commented Sep 29, 2022

please post a screenshot of the source view

I think the script always takes the principal element name. I think that's a limitation. Can you create a sample where the element principle name is a valid date format?

There should be an option for rest api function to use alias.

@MariusWirtz
Copy link
Collaborator

Thank you for reporting this @surdyed. I think it is a defect in cubecalc.

Cubecalc should use the alias if one is defined in the cube view selection.
I think we can get to resolve this issue next week.
If you need a short-term solution, feel free to open a PR.

@surdyed
Copy link
Author

surdyed commented Nov 1, 2022 via email

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

No branches or pull requests

2 participants