Thursday, August 9, 2018

MDX Generate()

I'm writing this post because I forget stuff all the time. This is one of those things I learned a few months ago and nearly forgot already...

One of the trickiest parts of dealing with MDX is shared members. They look different than regular members so a lot of functions don't recognize the stored and shared members as being the same. If you want them to look the same you need to use the Generate() function.

Suppose you want to compare a list of children to the currently selected member. It won't usually work if those children are shared members.


The following formula will yield a false result when the currently selected member is Flat Panel or HDTV or any of those shared members you see above.

IsChild([High End Merchandise].children,Products.CurrentMember)

In order to "clean" the shared nomenclature from the member you need to use Generate(). This will return a true result.

Contains([Products].CurrentMember,
               {Generate([High End Merchandise].Children
                                 {StrToMbr(Products.CurrentMember.Member_Name)})})

In this case Generate() loops through the set of children, returning the the cleaned up product name  into a new set. That set is then evaluated against the current product selection.

Thursday, May 10, 2018

Branching in MaxL

A fairly common task I run across when writing MaxL scripts is to have some logic where a certain file loads or a calc runs one day and a different file loads or a different calc runs on a different day. I'd usually write multiple MaxL scripts to handle this and call a different script on a different day. I'm not sure why it took me so long to figure this out, but it's really not difficult to handle this in one script.

1:  login $1 $2 on $3;  
2:    
3:  echo 'script starting';  
4:    
5:  goto $4;  
6:    
7:  define label '0';  
8:  echo 'Today is Sunday';  
9:  goto 'Finished';  
10:    
11:  define label '1';  
12:  echo 'Today is Monday';  
13:  goto 'Finished';  
14:    
15:  define label '2';  
16:  echo 'Today is Tuesday';  
17:  goto 'Finished';  
18:    
19:  define label '3';  
20:  echo 'Today is Wednesday';  
21:  goto 'Finished';  
22:    
23:  define label '4';  
24:  echo 'Today is Wednesday';  
25:  goto 'Finished';  
26:    
27:  define label '5';  
28:  echo 'Today is Thursday';  
29:  goto 'Finished';  
30:    
31:  define label '6';  
32:  echo 'Today is Friday';  
33:  goto 'Finished';  
34:    
35:  define label '7';  
36:  echo 'Today is Saturday';  
37:  goto 'Finished';  
38:    
39:  define label 'Finished';  
40:  echo 'script is finished';  
41:    
42:  logout;  
43:  exit;  

When I call the MaxL script, I pass in User ID, Password, Hostname and then a number for the day of the week. Only the part between the label and the goto will be executed.

Friday, October 28, 2016

The Calm Before the Storm

I haven't had a lot to post about lately. I had been wondering if it was my fault but someone set my mind at ease this week. There really hasn't been much new Essbase functionality released lately. A lot of Oracle's focus has been on getting Essbase Cloud Services ready, which I think, has diverted some of the attention from the on premises version. So I view this as a quiet period before our next round of fun begins. Fully functioning Hybrid will be a part of that in all likelihood. That should be a game changer.

I've been plugging away at ASO procedural calcs but that isn't anything cutting edge anymore. I'm hoping to get Essbase 12c up and running now that it included EAS. I'll share any thoughts I have on it in this space soon.

Monday, July 25, 2016

Kscope16 Reflections

I've had a few weeks to digest all the Kscope16 content and experiences I absorbed. I really had a great, if exhausting, time at the end of June with all of my favorite EPM people. This was my second Kscope conference and I think that I got more out of this year's conference than Kscope15. Part of that has to do with relationship building. There's no good substitute for meeting people face to face, interacting with them and discussing things. I will note three main reflections from the conference.

People and Relationships

I put this first because I believe this is the single greatest benefit of Kscope. I do interact with people via Twitter, OTN, Network54, email but I am the type of person who needs personal contact. I got a chance to speak with people from around the world catching up with them on topics ranging from the latest technology trends to the Brexit announcement. It was really cool to hear the opinions of such a diverse bunch of folks. Having access to the greatest minds in the EPM world, including the Essbase product management team is pretty much a once a year opportunity and Kscope is it. I look forward to Kscope17 where I'll be able to further develop the bonds begun this year.

Hybrid

Much of my technical interest in the conference was directed toward Essbase Hybrid aggregation. The panel of customers and consultants who are running Hybrid in production was particularly enlightening. It seems clear to me from listening to Oracle product managers that this is the direction Essbase is headed. Having said that, I really feel like Oracle needs to have a single message related to Hybrid. I heard "Hybrid is just BSO", which is kind of true. Then I heard "Hybrid is BSO with ASO aggregations" which is also true. I think I heard a few other things. Couple that with the fact that the word "hybrid" means a lot of things, even just in the EPM world, and there is the potential for a lot of confusion. Having said all that, I'm looking forward to coming enhancements that will take Hybrid to the next level.


My Sessions

I'm not sure what I was thinking when I submitted three abstracts for Kscope16. I guess I forgot how much actual work goes into creating a technical presentation. Thankfully only two abstracts were accepted. I thought the presentations went fairly well but then I got back my evaluations yesterday. They weren't bad but it was funny to read them. Apparently my audience thought that their fellow audience members "asked too many annoying questions." Anyway, the feedback was important and hopefully I can use it to improve my future presentations. There are a few reasons I'd encourage others to present at a future Kscope. 1) When creating a presentation it really forces you to know your topic. You learn a lot during that preparation. 2) You get to show what you can do to potential future clients and co-workers. Imagine walking in to meet an interviewer and they remember you from the killer presentation you gave a couple of years ago. 3) The amount of interaction and discussions your session fosters with attendees is incredible. I cannot even count the number of people who came up to me in the hours and days following my presentation to thank me and discuss the topics further. Those were some of the best conversations I had all week.

Final Thoughts

If you haven't been to Kscope before, I'd encourage you to go. It really is a lot of fun. If you've been and haven't presented, I'd encourage you to think about submitting an abstract on a topic near and dear to your heart.