Wildcard Search in a Dimension

jack_008
Posts: 12
Joined: Wed Sep 28, 2016 2:20 pm
OLAP Product: TM1
Version: 10.3
Excel Version: Excel 2013

Wildcard Search in a Dimension

Post by jack_008 »

Could anyone please let me know what are the drawbacks of "Wildcard Search" in a Dimension in TM1?

Also in case of DIMIX(server_name:dimension, element), what kind of search is performed here, is it the exact Element search or a Wildcard search? Could anyone please tell,how the search is narrowed down in this case?

Thanks in Advance !
Wim Gielis
MVP
Posts: 3119
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.9.18
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Wildcard Search in a Dimension

Post by Wim Gielis »

DIMIX is an exact match, taking into account that:

- all aliases are looked at
- TM1 being case-insensitive and space-insensitive

The drawbacks are that you can only search in the currently selected alias.
Best regards,

Wim Gielis

IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
upali
Posts: 38
Joined: Thu Oct 11, 2012 6:15 am
OLAP Product: TM1
Version: 10.2.2.4
Excel Version: 2010
Location: Melbourne, Australia

Re: Wildcard Search in a Dimension

Post by upali »

Also Scan() is case-sensitive, if you want to use that as a search mechanism.
jack_008
Posts: 12
Joined: Wed Sep 28, 2016 2:20 pm
OLAP Product: TM1
Version: 10.3
Excel Version: Excel 2013

Re: Wildcard Search in a Dimension

Post by jack_008 »

Wim Gielis wrote:DIMIX is an exact match, taking into account that:

- all aliases are looked at
- TM1 being case-insensitive and space-insensitive

The drawbacks are that you can only search in the currently selected alias.

Thanks for your answer ! :)

Well i would like to show a scenario in which I'm facing problem.

I have an import file which have 2 coloumns(vA & vR).Taking an example:

vA = 328976
VR = Mise à disposition de ressources


Now the values of "vA" needs to be inserted in a dimension(say 'DimensionD'), as an element, if & only if "vR" is found in other dimension(say 'DimensionR').
So the script i have used is:

If(DIMIX('DimensionR', vR)>0);
DimensionElementInsert('DimensionD', '', vA, 'n');
EndIf;

Also in the Prolog tab of the TI process, I have used ----> ( SetInputCharacterSet('TM1CS_UTF8');)

Now Dimix searches for 'vR' in 'DimensionR' & adds 'vA' in 'DimensoionD' for the above example.

But the thing is in 'DimensionR' there is no exact match for the value "Mise à disposition de ressources" when i search it manually. Instead there are values like:

1. RTY KP - Mise à dispo ressources
2. HJG678_KP Mise à disposition Fonction Su
3. HJG678_KP Mise à disposition FS -Recette
4. RTY KP - Mise à dispo ress. - Recettes
5. MISE A DISPOSITION RESSOURCES_RECETTES

How is this possible, that the element is getting inserted in the dimension, even when the exact match is not found considering the above 5 cases? Please let me know, if I'm missing something.

Thanks in advance for your reply !
declanr
MVP
Posts: 1815
Joined: Mon Dec 05, 2011 11:51 am
OLAP Product: Cognos TM1
Version: PA2.0 and most of the old ones
Excel Version: All of em
Location: Manchester, United Kingdom
Contact:

Re: Wildcard Search in a Dimension

Post by declanr »

When searching have you checked all aliases?
Declan Rodger
jack_008
Posts: 12
Joined: Wed Sep 28, 2016 2:20 pm
OLAP Product: TM1
Version: 10.3
Excel Version: Excel 2013

Re: Wildcard Search in a Dimension

Post by jack_008 »

declanr wrote:When searching have you checked all aliases?
Yes , i have checked all the Aliases but no Luck !
declanr
MVP
Posts: 1815
Joined: Mon Dec 05, 2011 11:51 am
OLAP Product: Cognos TM1
Version: PA2.0 and most of the old ones
Excel Version: All of em
Location: Manchester, United Kingdom
Contact:

Re: Wildcard Search in a Dimension

Post by declanr »

Try to just copy and paste the element name into the subset editor window and see what you get.
Declan Rodger
Wim Gielis
MVP
Posts: 3119
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.9.18
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Wildcard Search in a Dimension

Post by Wim Gielis »

Also, watch out for invisible characters. An article on that can be found on my website. The site changed to extension .com instead of .be
Best regards,

Wim Gielis

IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
jack_008
Posts: 12
Joined: Wed Sep 28, 2016 2:20 pm
OLAP Product: TM1
Version: 10.3
Excel Version: Excel 2013

Re: Wildcard Search in a Dimension

Post by jack_008 »

declanr wrote:Try to just copy and paste the element name into the subset editor window and see what you get.
Well, i get the error while doing it which says "Can not include the following names in the subset because they are not valid element names for the dimension" .
daniel.havassy
Posts: 30
Joined: Wed Sep 14, 2016 9:26 am
OLAP Product: Planning Analytics Local
Version: 2.0.4
Excel Version: 2016

Re: Wildcard Search in a Dimension

Post by daniel.havassy »

Maybe this was the first thing you did, but I'll mention it nevertheless. Did you try inserting some debugging code into your script? I mean, just a simple ASCIIOutput capturing the most essential things for each record, and examining the part when an erroneous insertion to DimensionD was done?
David Usherwood
Site Admin
Posts: 1454
Joined: Wed May 28, 2008 9:09 am

Re: Wildcard Search in a Dimension

Post by David Usherwood »

Did you try inserting some debugging code into your script?
Always a good idea. Note that 10.2.2 FP7 (and PA2 = TM1 11) include a TI debugger. I've not spent a lot of time with it yet as it doesn't play well with enlarged fonts on Dell laptops, but it's got to be a major step in the right direction. (From our records TI has been around since TM1 7.1, August 99, so good to see some progress :roll: )
jack_008
Posts: 12
Joined: Wed Sep 28, 2016 2:20 pm
OLAP Product: TM1
Version: 10.3
Excel Version: Excel 2013

Re: Wildcard Search in a Dimension

Post by jack_008 »

daniel.havassy wrote:Maybe this was the first thing you did, but I'll mention it nevertheless. Did you try inserting some debugging code into your script? I mean, just a simple ASCIIOutput capturing the most essential things for each record, and examining the part when an erroneous insertion to DimensionD was done?
Yes, i did that. Actually there are a lot of elements in the Import files that need to be added in the "DimensionD" . But most of them are being rejected as their corresponding vR cannot be found in DimensionR. I have searched those vR manually as well in the dimension & didn't find anything even close to it. So the "Dimix" part seems to work fine atleast in some cases.
daniel.havassy
Posts: 30
Joined: Wed Sep 14, 2016 9:26 am
OLAP Product: Planning Analytics Local
Version: 2.0.4
Excel Version: 2016

Re: Wildcard Search in a Dimension

Post by daniel.havassy »

Jack, I'm not sure about the root cause unfortunately, but you could try adding another layer of checking. After the DIMIX returns a number greater then zero, you could insert another If structure where you could check the element principal names of vR and the element from DimensionR for string equality. (if you capture the return value of the DIMIX in a variable, you can use that in a DIMNM to get the corresponding element from DimensionR). If this check evaluates to true, you can go ahead and insert vA into DimensionD, and it would be interesting to capture those that return False, maybe it can help you in your further investigation.
User avatar
Steve Rowe
Site Admin
Posts: 2417
Joined: Wed May 14, 2008 4:25 pm
OLAP Product: TM1
Version: TM1 v6,v7,v8,v9,v10,v11+PAW
Excel Version: Nearly all of them

Re: Wildcard Search in a Dimension

Post by Steve Rowe »

My biggest pet hate ever being the grey area between subsets and elements.

I think that (in some versions?) subset names return a positive Dimix result that is greater than dimsz, can you check if you have a subset that has the same name as the problem "element".

This can be trapped by checking that your Dimix is less than Dimsz for a true element

Cheers,
Technical Director
www.infocat.co.uk
jack_008
Posts: 12
Joined: Wed Sep 28, 2016 2:20 pm
OLAP Product: TM1
Version: 10.3
Excel Version: Excel 2013

Re: Wildcard Search in a Dimension

Post by jack_008 »

daniel.havassy wrote:Jack, I'm not sure about the root cause unfortunately, but you could try adding another layer of checking. After the DIMIX returns a number greater then zero, you could insert another If structure where you could check the element principal names of vR and the element from DimensionR for string equality. (if you capture the return value of the DIMIX in a variable, you can use that in a DIMNM to get the corresponding element from DimensionR). If this check evaluates to true, you can go ahead and insert vA into DimensionD, and it would be interesting to capture those that return False, maybe it can help you in your further investigation.

Thanks for your suggestion. I'll try out that. :)

Actually, there is another scenario that i came across.

vA= 576769
vR= synchronizing available contacts

the above vA gets inserted in DimensionD. But the thing is "synchronizing available contacts" in not present in DimensionR. Instead, the value that is present in DimensionR are:


1. R-BD_FGT678_CR_Synchronisation des contacts disponibles
2. FTRE_Synchronisation des contacts disponibles
3. GHY_UT_456_Synchronisation des contacts disponibles
4. KLOI890_Synchronisation des contacts disponibles

If I translate "Synchronisation des contacts disponibles" it says "synchronizing available contacts" which is equal to required vR. So, is this thing possible in TM1, the translation part.
jack_008
Posts: 12
Joined: Wed Sep 28, 2016 2:20 pm
OLAP Product: TM1
Version: 10.3
Excel Version: Excel 2013

Re: Wildcard Search in a Dimension

Post by jack_008 »

Wim Gielis wrote:Also, watch out for invisible characters. An article on that can be found on my website. The site changed to extension .com instead of .be


Actually, there is another scenario that i cam across.

vA= 576769
vR= synchronizing available contacts

the above vA gets inserted in DimensionD. But the thing is "synchronizing available contacts" in not present in DimensionR. Instead, the value that is present in DimensionR are:


1. R-BD_FGT678_CR_Synchronisation des contacts disponibles
2. FTRE_Synchronisation des contacts disponibles
3. GHY_UT_456_Synchronisation des contacts disponibles
4. KLOI890_Synchronisation des contacts disponibles

If I translate "Synchronisation des contacts disponibles" it says "synchronizing available contacts" which is equal to required vR. So, is this thing possible in TM1, the translation part??

Thanks for your help in advance !
User avatar
Steve Rowe
Site Admin
Posts: 2417
Joined: Wed May 14, 2008 4:25 pm
OLAP Product: TM1
Version: TM1 v6,v7,v8,v9,v10,v11+PAW
Excel Version: Nearly all of them

Re: Wildcard Search in a Dimension

Post by Steve Rowe »

Dimix will only return exact matches, if the problem string is an element pasting it into the subset editor should be error free irrespective of alias used.

Did you miss my comment on subsets just before your posts? I'd check that
Technical Director
www.infocat.co.uk
tomok
MVP
Posts: 2832
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: Wildcard Search in a Dimension

Post by tomok »

It sounds like you are using the Caption attribute feature in TM1 to make your system multi-lingual which would indeed make a huge difference as I believe the other language values are treated as aliases and would explain the behavior. It would have been nice to know this fact a lot earlier in the discussion.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
jack_008
Posts: 12
Joined: Wed Sep 28, 2016 2:20 pm
OLAP Product: TM1
Version: 10.3
Excel Version: Excel 2013

Re: Wildcard Search in a Dimension

Post by jack_008 »

tomok wrote:It sounds like you are using the Caption attribute feature in TM1 to make your system multi-lingual which would indeed make a huge difference as I believe the other language values are treated as aliases and would explain the behavior. It would have been nice to know this fact a lot earlier in the discussion.
Thanks Tom !

Actually , I just saw that we are using the }ElementAttributes_}Cultures(Caption Attribute feature) for different languages , which explains the translation part.
lotsaram
MVP
Posts: 3654
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Wildcard Search in a Dimension

Post by lotsaram »

Steve Rowe wrote:My biggest pet hate ever being the grey area between subsets and elements.

I think that (in some versions?) subset names return a positive Dimix result that is greater than dimsz, can you check if you have a subset that has the same name as the problem "element".

This can be trapped by checking that your Dimix is less than Dimsz for a true element

Cheers,
Vastly off-topic now but I had a run in with this bug / feature. You can insert subsets into subsets (via the subset editor with copy/paste of the subset names) where they act just like user defined consolidations. We had a standard process that cloned subsets (just copying elements from one subset to another) which mysteriously errored, after some digging I figured out that SubsetGetElementName returned the names of subsets which had been added to other subsets but the very next line SubsetElementInsert then errored as the name returned in the line above wasn't actually an element in the dimension.
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
Post Reply