Ultimate Long TM1 quiz

User avatar
Elessar
Community Contributor
Posts: 363
Joined: Mon Nov 21, 2011 12:33 pm
OLAP Product: PA 2
Version: 2.0.9
Excel Version: 2016
Contact:

Ultimate Long TM1 quiz

Post by Elessar »

|||
PLAСE FOR WINNER HERE
^^^

Current question: viewtopic.php?p=83739#p83739

Leaderboard:
  1. MarenC - 6.5
  2. Adam - 5
  3. ascheevel - 4.5
  4. ardi - 4
  5. EP_explorer - 3
  6. michalb - 2
  7. Mark RMBC - 1

Hello Everybody!

I have collected a huge amount of TM1 questions while interviewing people. I want to share them with the community, and I want to make this in a form of a quiz. After all this ends, everybody will be able to use all questions for interviewing or for interview preparation. I think I'll be able to make 52 questions, so that the quiz will last for a year.

Every Friday evening ((or Saturday. Or Sunday. I'm not a robot) excluding Fridays when I will be on a vacation :)) I will post a new question, answer to the previous question and announce the winner of previous week. Everybody is welcome to answer the question. Author of the best answer (and who is not MVP or Site Admin) becomes a winner of this week. The best answer is correct, most detailed and most independent one. I will choose it subjectively. MVPs, site admins are not forbade to answer, but they will not participate in the leaderboard.
Please feel free to correct me where I am wrong.
I have not sorted them by difficulty, so there can be a very easy question after a very difficult question. That's by design.

The one who wins the most weeks will become super-winner of the whole quiz. His nickname (or photo, or real name) will be placed on the top of this post.

Please feel free to PM me your ideas for quiz questions. The ones I've liked will be also published in this quiz with indication of the author (and I think the most active author will also be in the Hall of Fame on top of this post).
Last edited by Elessar on Fri Jul 12, 2024 3:07 pm, edited 33 times in total.
Best regards, Alexander Dvoynev

TM1 and Data Science blog: 7th article - Development requirements.
User avatar
Elessar
Community Contributor
Posts: 363
Joined: Mon Nov 21, 2011 12:33 pm
OLAP Product: PA 2
Version: 2.0.9
Excel Version: 2016
Contact:

Re: Ultimate Long TM1 quiz

Post by Elessar »

The first questions are extensions of Yuri Kudryavcev's consolidated feeders questions: https://www.ykud.com/blog/cognos/tm1-co ... d-feeders/. You must look at them, if not yet. They are great because you can determine whether somebody knows how feeders work or not just in 5 minutes.

Question #1:

Cubes, attributes, rules and dimensions are on the screenshots. What will Total Year value be for each ABC1 element after feeder rule is saved?

Image 64.png
Image 64.png (19.33 KiB) Viewed 9753 times
Image 40.png
Image 40.png (23.95 KiB) Viewed 9753 times
Image 42.png
Image 42.png (17.91 KiB) Viewed 9753 times
Best regards, Alexander Dvoynev

TM1 and Data Science blog: 7th article - Development requirements.
ardi
Community Contributor
Posts: 159
Joined: Tue Apr 02, 2013 1:41 pm
OLAP Product: tm1, cognos bi
Version: from TM1 9.4 to PA 2.0.9.6
Excel Version: 2010
Location: Toronto, ON

Re: Ultimate Long TM1 quiz

Post by ardi »

Only B1 and C1 are being fed, so the in the ABC1 Cube, the value of each elements will be:

ABC1('A1', 'Total Year') = 0 # A1 is not being fed,
ABC1('B1', 'Total Year') = 16
ABC1('C1', 'Total Year') = 15
Ardian Alikaj
ZLD
Posts: 3
Joined: Sun Jan 07, 2024 4:44 pm
OLAP Product: TM1
Version: 2.0.9.18
Excel Version: Microsoft 365

Re: Ultimate Long TM1 quiz

Post by ZLD »

Same as above 0, 16, 15.
A is not fed since feeders only apply to leaf cells not consolidated ones, B and C are fed instead to B1 and C1 in this case because feeding from consolidation will feed its leaf descendants, thus B1 and C1 cells are marked to use standard dense data structures algorithm.

SKIPCHECK is in rules of the fed cube, so sparse data compression algorithm is on by default. When calculating consolidated cells of "Total Year", A1 cells are not marked as exception to the algorithm so they will be skipped while B1 and C1 are, so ['A1', 'Total Year'] is 0, ['B1', 'Total Year'] 16, and ['C1', 'Total Year'] 15.
User avatar
WilliamSmith
Posts: 43
Joined: Tue Dec 13, 2022 8:54 pm
OLAP Product: TM1 / PA / PAx / PAW
Version: TM1 11
Excel Version: 365

Re: Ultimate Long TM1 quiz

Post by WilliamSmith »

ABC1 intersection @ (Total Year, A1) is not being fed, so the value will return 0.

B1 will consolidate across month dimension = 16
C1 same = 15
MarenC
Regular Participant
Posts: 364
Joined: Sat Jun 08, 2019 9:55 am
OLAP Product: Planning Analytics
Version: Planning Analytics 2.0
Excel Version: Excel 2016

Re: Ultimate Long TM1 quiz

Post by MarenC »

While this one was pretty straightforward, I do hope we will be getting the answers to these questions at some point! :D
User avatar
Elessar
Community Contributor
Posts: 363
Joined: Mon Nov 21, 2011 12:33 pm
OLAP Product: PA 2
Version: 2.0.9
Excel Version: 2016
Contact:

Re: Ultimate Long TM1 quiz

Post by Elessar »

MarenC wrote: Tue Jan 09, 2024 1:55 pm While this one was pretty straightforward, I do hope we will be getting the answers to these questions at some point! :D
Of course! Tomorrow I will announce a winner, correct answer and next question
Best regards, Alexander Dvoynev

TM1 and Data Science blog: 7th article - Development requirements.
User avatar
Elessar
Community Contributor
Posts: 363
Joined: Mon Nov 21, 2011 12:33 pm
OLAP Product: PA 2
Version: 2.0.9
Excel Version: 2016
Contact:

Re: Ultimate Long TM1 quiz

Post by Elessar »

Correct answer: 0 16 15.

Winner of this week is ardi!
All answers are correct, but ardi was first.

Question #2:

Same rule, Feeder is changed:
Image 43.png
Image 43.png (18.23 KiB) Viewed 8849 times
Best regards, Alexander Dvoynev

TM1 and Data Science blog: 7th article - Development requirements.
ardi
Community Contributor
Posts: 159
Joined: Tue Apr 02, 2013 1:41 pm
OLAP Product: tm1, cognos bi
Version: from TM1 9.4 to PA 2.0.9.6
Excel Version: 2010
Location: Toronto, ON

Re: Ultimate Long TM1 quiz

Post by ardi »

Still the results will be the same:

ABC1('A1', 'Total Year') = 0
ABC1('B1', 'Total Year') = 16
ABC1('C1', 'Total Year') = 15
  • A1 will not be fed
    B1 will be fed from B
    C1 will be fed from C
Ardian Alikaj
User avatar
Elessar
Community Contributor
Posts: 363
Joined: Mon Nov 21, 2011 12:33 pm
OLAP Product: PA 2
Version: 2.0.9
Excel Version: 2016
Contact:

Re: Ultimate Long TM1 quiz

Post by Elessar »

-Correct answer: 0 16 15. Again

Winner of this week is ardi!
Again :).
As a reminder: the best answer is correct, most detailed and most independent one. Nobody has described how feeders work when consolidated element is set on the left side of feeder and why numbers have not changed. If there was such description, I would give prize to it's author.

Question #3:

Same rule, Feeder is changed. There is a tricky part in this question, be careful!
Image 45.png
Image 45.png (18.01 KiB) Viewed 8529 times
Last edited by Elessar on Sat Jan 20, 2024 1:40 pm, edited 1 time in total.
Best regards, Alexander Dvoynev

TM1 and Data Science blog: 7th article - Development requirements.
ascheevel
Community Contributor
Posts: 291
Joined: Fri Feb 15, 2013 5:49 pm
OLAP Product: TM1
Version: PA 2.0.9.1
Excel Version: 365
Location: Minneapolis, USA

Re: Ultimate Long TM1 quiz

Post by ascheevel »

We're assuming persistent feeders are off and cube is unloaded/reloaded after each feeder change right?

ABC1('A1', 'Total Year') = 31 (fed from ABC:B & ABC:C)
ABC1('B1', 'Total Year') = 0 (not fed)
ABC1('C1', 'Total Year') = 0 (not fed)

ABC:A is consolidation so leaf children of A will feed ABC1:A1
ABC:B feeds ABC1:A1
ABC:C feeds ABC1:A1
User avatar
Elessar
Community Contributor
Posts: 363
Joined: Mon Nov 21, 2011 12:33 pm
OLAP Product: PA 2
Version: 2.0.9
Excel Version: 2016
Contact:

Re: Ultimate Long TM1 quiz

Post by Elessar »

No additional actions were announced ;) Just changed the feeder and saved the rule
Best regards, Alexander Dvoynev

TM1 and Data Science blog: 7th article - Development requirements.
ardi
Community Contributor
Posts: 159
Joined: Tue Apr 02, 2013 1:41 pm
OLAP Product: tm1, cognos bi
Version: from TM1 9.4 to PA 2.0.9.6
Excel Version: 2010
Location: Toronto, ON

Re: Ultimate Long TM1 quiz

Post by ardi »

In that case, all cells will ne fed. Previously fed cells will remain fed until feeders will be rebuilt. On top of existing feeders, the updated feeder will Feed A1, so the results will be:

ABC1('A1', 'Total Year') = 31
ABC1('B1', 'Total Year') = 16
ABC1('C1', 'Total Year') = 15

But after the feeders get rebuilt, B1 and C1 will not be fed anymore
Ardian Alikaj
ascheevel
Community Contributor
Posts: 291
Joined: Fri Feb 15, 2013 5:49 pm
OLAP Product: TM1
Version: PA 2.0.9.1
Excel Version: 365
Location: Minneapolis, USA

Re: Ultimate Long TM1 quiz

Post by ascheevel »

Elessar wrote: Sat Jan 20, 2024 1:42 pm No additional actions were announced ;) Just changed the feeder and saved the rule

Then I concur with ardi, ABC1:B1 and ABC1:C1 retain their fed status from previous feeder. If model is configured with persistent feeders ON, this will persist even after a server restart. If persistent feeders is OFF, then ABC1:B1 and ABC1:C1 will no longer be fed after the next cube unload/load or server restart.
User avatar
Elessar
Community Contributor
Posts: 363
Joined: Mon Nov 21, 2011 12:33 pm
OLAP Product: PA 2
Version: 2.0.9
Excel Version: 2016
Contact:

Re: Ultimate Long TM1 quiz

Post by Elessar »

Correct answer:
  • 31 16 15 - if rule was just resaved;
  • 31 0 0 - if rule was written from scratch.
If a cell is fed once, it will retain being fed even if we delete the whole "FEEDERS;" section. Server will not run through the whole cube looking for fed cells.

Winner of this week are ascheevel and ardi! Both receive 0.5 points

Question #4:
I need 31 0 0 here. But B1 and C1 are fed already. What should I do to clear feeders in a cube before (or after?) saving rule with the new feeder? Persistent feeders are OFF
Last edited by Elessar on Tue Jan 30, 2024 6:47 am, edited 2 times in total.
Best regards, Alexander Dvoynev

TM1 and Data Science blog: 7th article - Development requirements.
ascheevel
Community Contributor
Posts: 291
Joined: Fri Feb 15, 2013 5:49 pm
OLAP Product: TM1
Version: PA 2.0.9.1
Excel Version: 365
Location: Minneapolis, USA

Re: Ultimate Long TM1 quiz

Post by ascheevel »

With rule & feeders in place from Q3, unload the ABC1 cube and process feeders for cube ABC.

TI code:

Code: Select all

CubeUnload('ABC1');
CubeProcessFeeders('ABC');



edit: also, ardi deserves at least half, if not full, credit for Q3 for his correct answer after I foolishly assumed you would be unloading cubes between feeder changes.
User avatar
Elessar
Community Contributor
Posts: 363
Joined: Mon Nov 21, 2011 12:33 pm
OLAP Product: PA 2
Version: 2.0.9
Excel Version: 2016
Contact:

Re: Ultimate Long TM1 quiz

Post by Elessar »

That is not correct. CubeUnload stopped clearing feeders in one of the PA versions (I think it was in PA 2.0.0-2.0.4 period, but might be wrong. Does anybody know?).
There are different ways to purge feeders, all should be listed in the most detailed answer

edit: It was very hard to decide, but you have asked the exact question which proves that you are aware. But yes, the answer should be detailed. So let's really divide the price
Best regards, Alexander Dvoynev

TM1 and Data Science blog: 7th article - Development requirements.
ascheevel
Community Contributor
Posts: 291
Joined: Fri Feb 15, 2013 5:49 pm
OLAP Product: TM1
Version: PA 2.0.9.1
Excel Version: 365
Location: Minneapolis, USA

Re: Ultimate Long TM1 quiz

Post by ascheevel »

Ooohhh, you're a hard one to please :D

CubeUnload, if it stopped purging feeders at some point it appears to be working in the newer versions. BUT, if you're stuck on one of the versions where you can't rely on that to purge feeders. You could right-click the ABC1 cube in Architect and unload. In PAW Workbench (not sure since which version), you can also right-click ABC1 cube ->cube operations->unload. As for reprocessing feeders after the ABC1 cube is unloaded, besides the TI, you can edit the ABC cube rules with a new feeder (either delete the feeder update from Q3, save, and then add-back and save). All of that failing, you could restart the tm1 service which will both purge and reprocess feeders since as you said Persistent feeders is OFF.

There's my best on this question, but I suspect I'm not thinking of even more options to achieve this. Why has ardi been quiet on this one, is he on vacation?

edit: adding tm1py function cubes.unload option for those on 2.0.8 (11.6) or higher
User avatar
Elessar
Community Contributor
Posts: 363
Joined: Mon Nov 21, 2011 12:33 pm
OLAP Product: PA 2
Version: 2.0.9
Excel Version: 2016
Contact:

Re: Ultimate Long TM1 quiz

Post by Elessar »

Correct answer:
  • CubeUnload before re-saving new feeder - ok, it looks like I'm a looser for whom it does not work on 80% environments... I've also found one customer where it works on 2.0.9.12.
    There are different interfaces for it: manually in Architect, CubeUnload TI function, tm1py function cubes.unload
  • TI process with CubeClearData before re-saving new feeder, if CubeUnload does not work. ONLY for fully-calculated cubes: it will also delete all data
  • Server restart before or after re-saving new feeder
Winner of this week is ascheevel!

Question #5:
OK, I've saved a new feeder and restarted server (to be completely sure :)). Same rule, same question: What will Total Year value be for each ABC1 element after feeder rule is saved?
Image 46.png
Image 46.png (18.5 KiB) Viewed 7463 times
Best regards, Alexander Dvoynev

TM1 and Data Science blog: 7th article - Development requirements.
ascheevel
Community Contributor
Posts: 291
Joined: Fri Feb 15, 2013 5:49 pm
OLAP Product: TM1
Version: PA 2.0.9.1
Excel Version: 365
Location: Minneapolis, USA

Re: Ultimate Long TM1 quiz

Post by ascheevel »

ABC1
A1: 31
B1: 0
C1: 0

From cube ABC, leaf children of consolidated element A will feed the mapping attribute of A since you hard coded the element reference in the ATTRS statement. Feeder has same effect as your feeder in Question #3 only this time you've cleared all prior feeders.

From ABC
B will feed A1 (mapping attribute for ABC:A)
C will feed A1 (mapping attribute for ABC:A)
Post Reply