The OneStream Community is temporarily frozen until June 29th due to the ongoing maintenance. Please read the blog post here to learn more.
Forum Discussion
AndreaF
2 years agoContributor III
GetDataBufferUsingFormula not getting data when refering to a different scenario and time
Hi, I have a Custom Calc rule called by a data management step and I am experiencing a weird behaviour. I know there is data in Actual 2023M6, and I can get that data when running the data managemen...
- 2 years ago
The problem is not GetDataBufferUsingFormula, but FilterMembers. The first argument to FilterMembers is creating a buffer starting from the DataUnit currently being evaluated; the arguments after that are just filtering that buffer. So as it sees T#2023M6, FilterMembers builds you a buffer from DataUnit Cb#Main:E#RU0452:C#Local:S#M7:T#2023M6; by the time your clause to filter on S#Actual is considered, you already have a buffer *containing only records from S#M7*, so you filter them all out and you get an empty buffer.
If you want to override multiple DataUnit members, you have to do it in the first clause of FilterMembers, e.g. FilterMembers(T#2023M6:S#Actual, ...).
AndreaF
2 years agoContributor III
However, if I put the 2 things together and change the getdatabufferusingformula to point to S#Actual T#2023M6
Dim databuffer As DataBuffer = api.Data.GetDataBufferUsingFormula("FilterMembers(T#2023M6,S#Actual,A#AC890000.Base,F#None,U1#PR999998.Base,U1#None,U2#EQ0599.Base,U2#None,U3#None,U4#None,U5#Tot_Reporting.Base,U6#None,U7#None,U8#Actual)",,False)
and run the data management step from MF7 2023M12
I get no data
What am I doing wrong? Thank you
JackLacava
OneStream Employee
2 years agoThe problem is not GetDataBufferUsingFormula, but FilterMembers. The first argument to FilterMembers is creating a buffer starting from the DataUnit currently being evaluated; the arguments after that are just filtering that buffer. So as it sees T#2023M6, FilterMembers builds you a buffer from DataUnit Cb#Main:E#RU0452:C#Local:S#M7:T#2023M6; by the time your clause to filter on S#Actual is considered, you already have a buffer *containing only records from S#M7*, so you filter them all out and you get an empty buffer.
If you want to override multiple DataUnit members, you have to do it in the first clause of FilterMembers, e.g. FilterMembers(T#2023M6:S#Actual, ...).
Related Content
- 3 months ago