Page 6 of 11

Re: Ultimate Long TM1 quiz

Posted: Sat Jun 22, 2024 6:27 am
by Elessar
Correct answer:
}Picklist cube has priority over "picklist" attribute (if cell is not empty).

Winner of this round is MarenC!

Question #25:
(One of my favorite ones)
Write a rule to make not SUM, but PRODUCT of descendants in consolidated elements:
Image 55.png
Image 55.png (15.96 KiB) Viewed 28842 times

Re: Ultimate Long TM1 quiz

Posted: Sat Jun 22, 2024 1:05 pm
by Mark RMBC
Hi,

Don't think anything new in planning Analytics solves this, so the old method should still work.

Create a new measure called MinusValue

Rule for MinusValue is:

Code: Select all

['MinusValue']=N: IF(['B']<0,1,0);
Create a new measure called NatLog

Rule for NatLog is:

Code: Select all

['NatLog']=N:IF(['B']<>0, LN(ABS(['B'])),0);
Rule for C Level is:

Code: Select all

['B']=C:EXP(['NatLog']) * -1^['MinusValue'];
Old method is outlined here: viewtopic.php?p=26007#p26007

regards,

Mark

Re: Ultimate Long TM1 quiz

Posted: Mon Jun 24, 2024 10:07 am
by EP_explorer
As I Completely forget features on exp and logarithm and don't want to refresh my memory
so I have another solution
Question25_1.JPG
Question25_1.JPG (56.4 KiB) Viewed 28769 times
The most part of IFs has aim to avoid multiplying for zero (as a I understand we don't want to receive zero as answer although it seems it is correct answer for input data)

Re: Ultimate Long TM1 quiz

Posted: Fri Jun 28, 2024 3:04 pm
by Elessar
Correct answer:
Is described here: viewtopic.php?p=83664#p83664
Beautiful solution with a little Math and without recursion and next/previous elements.

Winner of this round is Mark RMBC! Welcome on board!

Question #26:
There are 4 rules to transfer data from ABC cube to ABC1 cube. Which of them will work correctly? Which is the best?
Image 59.png
Image 59.png (71.44 KiB) Viewed 28701 times

Re: Ultimate Long TM1 quiz

Posted: Mon Jul 01, 2024 2:21 pm
by MarenC
Hi,

I believe the first 2 rules in your screenshot will work and the other 2 will error, as ABC1 is the not the primary name of the element in ABC.

Funnily enough I don't know which of the first 2 is best, be interested to see the thinking behind the answer to that one. But given you are feeding from a text attribute I will guess that the first rule is the best one to use!

Maren

Re: Ultimate Long TM1 quiz

Posted: Fri Jul 05, 2024 11:27 am
by Adam
I like the first choice the most but would opt for DB against }ElementAttributes vs ATTRS as wiser people than me have said it’s faster.

I don’t like the Alias approaches as that doesn’t scale beyond 1 to 1 mapping. Same for DIMIX, that doesn’t scale when element order is different between ABC and ABC1.

Re: Ultimate Long TM1 quiz

Posted: Fri Jul 05, 2024 3:38 pm
by Elessar
Correct answer:
1st and 2nd will work. For "What is best" - it's a discussion question, firstly to discuss what mapping is better to use - text attribute-based, or alias-based. I prefer text attribute: this allows you to make not only 1*1 mappings, and also allows crazy mappings like "Map ABC1's B1 to ABC's C1".

And also, thanks Adam for note: Cubewise has proved that DB(}ElementAttributes...) works faster than ATTRS: https://code.cubewise.com/blog/7-tips-t ... ics-rules/

Winner of this round is MarenC!

Question #27:
A user has suppressed zero rows and wants to save list of non-zero accounts to a private subset. How can he perform this?

Image 60.png
Image 60.png (100.48 KiB) Viewed 28569 times

Re: Ultimate Long TM1 quiz

Posted: Wed Jul 10, 2024 9:34 am
by michalb
What I always do is apply "suppress zeros" in the rows. Then, I select all the elements in the rows of the suppressed view by clicking on the row header. Next, I right-click on any element and choose "keep". In the subset editor for the dimension in the rows, the subset I want to save will be on the right side. Finally, I choose "save as" and select "private".

Re: Ultimate Long TM1 quiz

Posted: Wed Jul 10, 2024 10:33 am
by MarenC
Hi,

I usually ensure access to the set editor is switched off, then I don't have to worry about this!

Maren

Re: Ultimate Long TM1 quiz

Posted: Fri Jul 12, 2024 3:07 pm
by Elessar
Correct answer:
  1. michalb's one: "I select all the elements in the rows of the suppressed view by clicking on the row header. Next, I right-click on any element and choose "keep". In the subset editor for the dimension in the rows, the subset I want to save will be on the right side. Finally, I choose "save as" and select "private"."
  2. Export to excel, copy-paste accounts to subset editor
  3. Write an MDX pointing to cube (need to know MDX)
  4. (for mammoths): In Architect, save view and use filter by view extract
Winner of this round is michalb!

I'll be on a vacation next 2 weeks, so here are 2 questions in a row:

Question #28:

User has READ access to the process, which writes data to a cube. User does not have access to the cube (NONE in }CubeSecurity). What will happen when user launches the process?

Question #29:

How can you transfer data between two different servers (let's say we are on on_prem PA)? What are PROs and CONs? Which is the best?

Re: Ultimate Long TM1 quiz

Posted: Sat Jul 13, 2024 6:49 am
by EP_explorer
28
Process copys data in the cube although user doesn't see the cube of course. Process launches with dataadmin rights.

29
1. I usually put data in text from server 1 and launch process which upload text file on server 2 (the process launches in the same process on server 1 using RunTI). It is the most resilient way although it is a shame for IBM that we have to use it
2. ODBO source in TI process. Sometimes it works but in the most part - don't. I don't know why. It seems it depends of volume of data. Small volume it can copy but if volume is more it stops working

Re: Ultimate Long TM1 quiz

Posted: Sat Jul 13, 2024 11:49 am
by MarenC
Hi,
Process launches with dataadmin rights.
I would say more than this, the process actually runs as the admin user. But maybe that is only the case when a process is called from a master process?

Other methods to copy data between servers:

Use TI to Ascii output from one server and use the Ascii as the datasource on the other server to import the data. Pros, quick to process. Cons, need processes on both servers.

Copy data folder objects from one server to the other if the whole cube is being copied. Pros, no new processes required. Cons, have to stop the server.

Maren

Re: Ultimate Long TM1 quiz

Posted: Mon Jul 15, 2024 9:00 am
by EP_explorer
MarenC wrote: Sat Jul 13, 2024 11:49 am Hi,
Process launches with dataadmin rights.
I would say more than this, the process actually runs as the admin user. But maybe that is only the case when a process is called from a master process?
For my observation - as dataadmin. In some special cases like when are made some reseravations in a cube (for example reservations nodes of tree by users in approval type applications) dataadmin rights aren't enough privileges for fill the cube and you have to launch process to fill the cube with RUNTI process by user with admin rights.

Re: Ultimate Long TM1 quiz

Posted: Mon Jul 15, 2024 9:13 am
by gtonkin
And likewise with Global Security Overlays - data admin cannot write to blocked cells but Admin can.

Re: Ultimate Long TM1 quiz

Posted: Tue Jul 30, 2024 7:03 am
by Elessar
I'm back!

Correct answer:

Question 28
Data will be written successfully.

Question 29
There are many ways:
  1. Use export to text file, import from file
  2. Use replication (need to know all caveats! Very dangerous option)
  3. Use REST API
  4. Use tm1py
  5. Use ODBO
  6. Migrate the whole .cub file
The most effective (and the least secure) one is export-import using csv files. You can also use different files (for example, one file for a country) and export-import data in parallel.

Winner of both rounds is EP_explorer!

Here is the question for this week:
Question #30:

For process from question # 28, what will happen if a target element is locked (most frequently because it is submitted using Contributor / TM1 Applications)? - this was already answered, process will not write data.
The question is: How can we handle this (for example, user needs to copy data from working to locked submitted version)?

Re: Ultimate Long TM1 quiz

Posted: Wed Jul 31, 2024 2:04 pm
by MarenC
Hi,

add CubeLockOverride(1) to the beginning of the Prolog and ensure the process has security access ticked.
Add CubeLockOverride(0) to the epilog, probably not strictly necessary but why not!

Maren

Re: Ultimate Long TM1 quiz

Posted: Fri Aug 02, 2024 3:02 pm
by Elessar
Correct answer:
Use CubeLockOverride function. It is undocumented, but works fine for years already.

Winner of this round is MarenC!

Question #31:

I want to insert a new element to dimension and add it to consolidation using TI process.
"DimensionElementComponentAdd('Dimension', 'Consolidation', 'Element', 1);" command will insert new element and add it to consolidation in one row. Is there any reason to make this in two rows: first insert element to dimension, then add it to consolidation?

Re: Ultimate Long TM1 quiz

Posted: Tue Aug 06, 2024 3:40 pm
by ascheevel
If you want 'Element' to be of type S or C and not N, you'd first want to do a DimensionElementInsert.

Re: Ultimate Long TM1 quiz

Posted: Tue Aug 06, 2024 4:14 pm
by Mark RMBC
Hi,

I would add that DimensionElementInsert also allows you to specify the Insertion point.

regards,

Mark

Re: Ultimate Long TM1 quiz

Posted: Fri Aug 09, 2024 2:37 pm
by Elessar
Correct answer:
  1. You can specify element type
  2. You can specify insertion point
  3. DimensionElementInsert will throw an error if the element already exists as an alias. DimensionElementComponentAdd alone will just add existing element to consolidation
Winners of this round are ascheevel and Mark RMBC (both receiving 0.5 points)!

Question #32:
You can list multiple data directories (yes, you can: https://www.ibm.com/docs/en/planning-an ... irectory-1) for DataBaseDirectory parameter in tm1s.cfg file. How does it work? How can you use it?