Page 1 of 1
E_Pick bug in 9.5.1?
Posted: Mon Mar 21, 2011 9:50 pm
by stex2727
Has anyone else noticed a bug using the E_Pick macro in 9.5.1. It seems to occur when
- you specify a dynamic subset in the options for e_pick
- select a single element
- hit OK
It all seems to work swimmingly untill it returns the wrong value or nothing at all. It works correctly if
1) you use the same subset but it is static or
2) You modify the subset somehow by hitting the keep button or resorting the subset
Steve
Re: E_Pick bug in 9.5.1?
Posted: Mon Mar 21, 2011 10:25 pm
by Alan Kirk
stex2727 wrote:Has anyone else noticed a bug using the E_Pick macro in 9.5.1. It seems to occur when
- you specify a dynamic subset in the options for e_pick
- select a single element
Well, you
have to select a single element. I asked Applix for a multi-select E_Pick which returned an array back when there were dinosaurs roaming down George St, but it was All Too Hard and they never bothered.
There's likely to be an API-based one in the next release of TM1 Tools though, even though we're getting paid rather less than Iboglix is.
stex2727 wrote:- hit OK
It all seems to work swimmingly untill it returns the wrong value or nothing at all. It works correctly if
1) you use the same subset but it is static or
2) You modify the subset somehow by hitting the keep button or resorting the subset
I can't reproduce this. I tested it on different dimensions, both with and without the optional arguments. I tested it on both Excel 2003 and, much as it pained me to do so, Excel 2007. In every case it returned the correct result.
The dynamic subsets that I used, though, were relatively simple ones which returned all of the N level elements. If yours are a bit fancier, perhaps being driven by attributes or some such, that may be the reason for the difference.
Re: E_Pick bug in 9.5.1?
Posted: Mon Mar 21, 2011 11:35 pm
by stex2727
ok getting closer, looks like you're right. Basically I want a filtered list based on a cell value. That is, if someone enters say "paper" it will return results like
paper - green
paper - black
paper - grey
This works well enough untill someone enters "paper - greenish" which doesnt exist and the TI process (to create the subset via mdx) aborts.
Sooo (time to fess up) I'm using an unsupported MDX function (IIF) function to to say if there will be 0 elements then return all elements. This appears to display correctly in the subset editor but returns the wrong results with epick
TM1FILTERBYPATTERN( {TM1SUBSETALL( [ABC_AllocationTo] )}, iif(count({TM1FILTERBYPATTERN( {TM1SUBSETALL( [ABC_AllocationTo] )}, "*paper*")}) = 0, "*" , "*paper*"))}
Steve
Re: E_Pick bug in 9.5.1?
Posted: Mon Mar 21, 2011 11:39 pm
by stex2727
a further note to above, the subset also works fine with e_pick if created and saved in the subset editor. It doesnt work when I create the subset using TI passing the same mdx statement through.
Re: E_Pick bug in 9.5.1?
Posted: Thu Mar 24, 2011 7:42 pm
by stex2727
a quick follow up note, I simplified the MDX statement to something like
{TM1FILTERBYPATTERN( {TM1SUBSETALL( [ABC_Employee] )}, "*steve*")} and it still didn't register the subset properly. The subset was created by creating the string in excel and running the TI process from excel.
It worked fine in cube viewer and scrolling through the list in TI, but would give the wrong results with E_pick (untill saved or changed in some way in the subset editor).
While its ugly, my final result involved writing out the subset into a text file and using subdefine to create a private subset instead.
Steve