Closed jbeanz23 closed 5 years ago
Hi,
could you perhaps just use a simple FILTER around the set expression, to filter your dimension by values from a different cube, like this?
{FILTER({TM1FILTERBYLEVEL( {TM1SUBSETALL( [Product] )}, 0)}, [Test].([Posting Measures].[Amount]) > 0 )}
More details here:
https://www.bihints.com/filter
By the way, iterating through a pandas dataframe is an anti-pattern. It should be avoided if possible. Here are more details: https://stackoverflow.com/questions/16476924/how-to-iterate-over-rows-in-a-dataframe-in-pandas/55557758#55557758
Thanks Marius I will try one of the other ways mentioned.....still learning how and what works best with these different libraries!
Perhaps if you use built-in data structures like lists and dictionaries it could be faster
OK, i will try re-doing this using one of those methods. Thank you!
Describe what did you try to do with TM1py Hi - When building the mdx queries through TM1py, do they accept Intersect and/or Union operators? I was not seeing any examples of this but i have a large amount of data that i need to compare against another view just on one dimension. The source dimension (Material Staging) has many more elements with a PO line then there are in the same cube with NSB Gross. The loop is looking for 57,000 elements by NSB and 37,000 we know do not have NSB. Is there a way to limit the set? I am already limiting it by values from the PO Lines view but since many do not have NSB it is still taking a long time to run. Is there a way you suggest, based on my code, that could make this more efficient?
Describe what's not working the way you expect Didn't get the expected result? Describe: The results are not incorrect, juts very slow right now, even though the amount of loops has been limited. I am attaching the current version.
Thanks
Version
Additional context scratch_AMEROccupancy2.zip
If you encounter an error, please add the error message and the stack trace