Skip to main content

Data & Intelligence

Cognos TM1 User Experience

The Quandary

I’ve literally written a ton of VBA code over the years to “enhance” my end user’s experience. For example, I’ve often slapped a button on a worksheet or toolbar and used the E_PICK to pop-up a dimension subset editor allowing a selection of particular element and then using that selection to drive changes in the worksheet.  This works well:

E_PICK

Cognos TM1 gives us the E_PICK function which is a macro function, valid only in Microsoft Excel macros and VBA modules. The function calls the TM1 Subset
Editor, listing all elements in the specified dimension. The element name you select in the Subset Editor becomes the return value of the E_PICK function call.

Syntax

E_PICK(Dimension, Alias, Subset, Element);

But!

What I really want to do from time to time is allow selection and return of multiple elements –which E_PICK does not support.

For example, I have a worksheet that lists accounts down the left of the worksheet and periods across the top. My goal is to allow the user to select from the periods dimension a “period view”. This can be any combination of periods.

A typical “view” selection might include a total year, 4 quarters and 3 months:

 

 

 

 

I want to permit the user to select all 8 elements and have them returned – preferably in an array.

No such luck with the E_PICK!

A Workable Solution

But, if I change out the E_PICK function with the SUBPICK, I’m (kind of) in business.

Have a look at the SUBPICK:

SUBPICK

This is also a macro function, valid only in Microsoft Excel macros and VBA modules. This function calls a dialog box that lists all the elements in the specified subset. The elements
you select are inserted in the active worksheet, starting at the current cell position.

Data Intelligence - The Future of Big Data
The Future of Big Data

With some guidance, you can craft a data platform that is right for your organization’s needs and gets the most return from your data capital.

Get the Guide

Syntax

SUBPICK(dimension, subset, vertical)

 

Sweet!

So I set up that same button, use the SUBPICK, and up comes that same subset editor, exposing the period dimension and this time my user makes the multiple selection and clicks OK.

Now, Cognos TM1 doesn’t understand arrays yet, so it does the next best thing. It returns the selected elements into your Microsoft Excel worksheet – which is nothing more than an “array of cells”.  You can even designate which worksheet (you make that worksheet the active sheet) and which cells (vertical – a column – or horizontal – a row).

So, in my case I spun the following simple, but useful, VBA code:

 ‘ — gotta make sure that it’s the active sheet and pointing to A1
    Worksheets(sInputWorksheetName).Activate
    Worksheets(sInputWorksheetName).Range(“A1”).Select

  ‘ — call tm1 subpicker and then set the screen updating off so we can rebuild
  ‘ — the template w/o showing the user the dirty work – it also saves on performance

    sPeriodSelections = Application.Run(“SUBPICK”, sPeriodDimName, “default”, True)
    Application.Cursor = xlWait
    Application.ScreenUpdating = False
    Application.StatusBar = “Configuring Template Periods. Please Wait!” 

Then of course I’d write some clever lines of code to refresh the periods currently residing across the top of my worksheet with the newly selected ones – making sure to then recalculate my sheet to bring back my TM1 data.

A Little Bit More

Of course I soon found that my users only had a handful of “period views” that they really cared about 90% of time and now they were annoyed that they had to “reselect” the same periods each time they used my worksheet.

So…

SUBDEFINE

This function creates a dimension subset consisting of element names found in the active worksheet.

So, making use of this handy little nugget, I implemented a few more lines of code to allow the user to save their favorite period views on the TM1 server for later selection and use.

   lAns = MsgBox(“Save Your Period View To TM1?”, vbYesNo, “Save Period View”)
    If lAns = vbYes Then
       Worksheets(sInputWorksheetName).Unprotect
       myname = InputBox(“Please Enter A Name To Save Your Period View As!”, “Save”)
       bResult = Application.Run(“SUBDEFINE”, sPeriodDimName, Trim(myname),        Worksheets(sInputWorksheetName).Range(“A1:A999”))
       If bResult = True Then MsgBox “Period View Saved to TM1!”
    End If

I know I know, so I finally ended up getting really creative and allowed the user to:

  • Share their views (save them as a public subset rather than a private subset)
  • Define a “default” period view that would load up upon opening the worksheet
  • Of course check for the existence of a previously saved view of the same name and choose to overwrite or provide an different name

And so on – you get the picture…

 

On a side note: I’ve reached my goal (although a bit later than I’d planned) of logging 1000+ miles this year.

Here is a pic from last night’s 7 miler:

Reality is merely an illusion, albeit a very persistent one. — Albert Einstein

Thanks!

 

Thoughts on “Cognos TM1 User Experience”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Jim Miller

Mr. Miller is an IBM certified and accomplished Senior Project Leader and Application/System Architect-Developer with over 30 years of extensive applications and system design and development experience. His current role is National FPM Practice Leader. His experience includes BI, Web architecture & design, systems analysis, GUI design and testing, Database modeling and systems analysis, design, and development of Client/Server, Web and Mainframe applications and systems utilizing: Applix TM1 (including TM1 rules, TI, TM1Web and Planning Manager), dynaSight - ArcPlan, ASP, DHTML, XML, IIS, MS Visual Basic and VBA, Visual Studio, PERL, Websuite, MS SQL Server, ORACLE, SYBASE SQL Server, etc. His Responsibilities have included all aspects of Windows and SQL solution development and design including: analysis; GUI (and Web site) design; data modeling; table, screen/form and script development; SQL (and remote stored procedures and triggers) development and testing; test preparation and management and training of programming staff. Other experience includes development of ETL infrastructure such as data transfer automation between mainframe (DB2, Lawson, Great Plains, etc.) systems and client/server SQL server and Web based applications and integration of enterprise applications and data sources. In addition, Mr. Miller has acted as Internet Applications Development Manager responsible for the design, development, QA and delivery of multiple Web Sites including online trading applications, warehouse process control and scheduling systems and administrative and control applications. Mr. Miller also was responsible for the design, development and administration of a Web based financial reporting system for a 450 million dollar organization, reporting directly to the CFO and his executive team. Mr. Miller has also been responsible for managing and directing multiple resources in various management roles including project and team leader, lead developer and applications development director. Specialties Include: Cognos/TM1 Design and Development, Cognos Planning, IBM SPSS and Modeler, OLAP, Visual Basic, SQL Server, Forecasting and Planning; International Application Development, Business Intelligence, Project Development. IBM Certified Developer - Cognos TM1 (perfect score 100% on exam) IBM Certified Business Analyst - Cognos TM1

More from this Author

Follow Us
TwitterLinkedinFacebookYoutubeInstagram