MDX / SSAS - Need flexible percent of parent measure - ssas

I’ve been searching for hours on this and I’m just not adept enough at MDX to know if I’ve come across the solution yet. Everything I tried has not worked. The situation is, I need a “percent of parent” measure. In this example, the only thing I have gotten to work, each product code attribute displayed shows it’s sales as a percentage of every other product code attribute displayed:
([Product].[Product Code].CURRENTMEMBER,
[Measures].[Sales]) / ([Product].[Product Code].CURRENTMEMBER.PARENT,
[Measures].[Sales])
The problem is when the users start dragging other dimensions in or other attributes not in that hierarchy, or don’t use the product code attribute, it stops working and I get #NUM! values. Is there anyway to do a better percent of parent measure that’s more flexible? I really need something like a “percent of what’s visible” measure, ideally not dependent on a single dimension.

unfortunately I can't provide a fully working example due to the lack of my laptop during my vacation :-)
What you're looking for can be achieved with the MDX functions AXIS and ITEM. Within this book
http://www.amazon.com/Microsoft-Server-Analysis-Services-Cookbook/dp/1849681309/ref=sr_1_1?ie=UTF8&qid=1372255356&sr=8-1&keywords=tomislav+piasevoli
there is a dedicated chapter about "Context-Aware Calculations"
Hope this helps somehow
Tom

Related

SSAS cube - ordering of measures and dimensions

I have inherited several cubes and have learned a bit through doing maintenance and updates to the cubes. One thing I don't understand is "ordering" for measures and dimensions. I use Visual Studio 2015 and 2017 in case it matters. In the dsv, the named queries are all listed in alphabetical order which is perfect. In the cube, however, the Measures and Dimensions are not shown in alphabetical order, and I also don't see an option to sort. Why is that? I have tried to find an answer, and it seems to be to manually drag things into the desired order. But every website I find that says this also has this cryptic statement: "The order will affect how certain client applications order these measures." Does anyone know what "certain client applications" refers to? Am I going to cause trouble for myself if I move the Measures and Dimensions around so they are in alphabetical order? There are a lot of dimensions, which is why I want to do this -- I waste so much time manually looking through the list of Dimensions (there are > 70), trying to find the one I want.
The cube also has many calculations (>60), which are also not ordered. Similar question there: could it be problematic if I change the ordering there?
The cube is used by Excel users as well as by dashboards.
Update: It's been many months now since I manually reordered my cube measures and dimensions. I have found no ill effects, even with calculations, and it makes it much easier to find things. To answer the question "why," it's because my cube has 13 measure groups and about 90 dimensions, and it makes it easier for me to find things while doing active development. Yes, the ordering is automatic for Excel users but it's not automatic for developers.

Big Commerce, Top\Featured\New Products on category page

Hi there working with bigcommerce Im looking to get the following style of break down on each category page
Essentially making a category version of;
%%Panel.HomeFeaturedProducts%%
%%Panel.SideTopSellers%%
%%Panel.HomeNewProducts%%
Ive gone ahead and attempted this however they seem to be pulling in from global values, and there dose not seem to me much option to break these down or limit the category, has anyone done this previously and if so how?
developerscott is correct in those panels not offering contextually unique data. I'd recommend looking into Unbxd. It has a 30 day trial so you can either investigate their programmatic solution or use it in place of making your own.

Is it possible to have text measures in SSAS tabular?

The question pretty much sums it up.
I am creating a model that involves textual status information on some processes. I would like to show these as text but cant for the life of me figure out how.
Tried FirstNonBlank(textualcolumn, 1) without luck. Anyone know if this is possible?
Rather than having a text measure physically in any fact table I would suggest you to go for calculated measure. As per your post the measure has to represent some process status (I suppose Open or closed), you can easily write a MDX expression for the calculated measure.

SharePoint 2010 Lists - Totals at Bottom of List Instead of Top of List

Is there a simple way to cause the column totals (like Sum) to appear at the end of a list instead of at the top of the list? Having them at the top just seems unnatural...
Thanks
Lonnie Tyre
You can move the totals to the bottom as described here.
I'd probably venture to guess that this was done because some lists may be large and span multiple pages and it could take quite a while to find out how many items are on a list.
However, you do have options. If you are code-savy, you can enlist the SPList.ItemCount Property and get your answer. From there you can put it anywhere you please. I have done it for custom web part development where the count drove certain things. For instance, maybe you would like to fire some event or change the style of something on the page based on how many tasks a user has assigned to them. You can get that information a few different ways but this is just one.
I'd look into possibly creating your own display forms if you have a strong enough desire. I have done that in SPD a few times.
Good luck!

Trace back columns in calculated measures

How do I trace back the actual columns used/joined in calculated measure? THe reason I am asking this question is, I am trying to write the equivalent TSQL query to verify the result with that of calculated measure.
So far, my approach has been a look up into the measure properties and find the table/view and the column name used. The joining column has been a difficult part (let s say it impossible for me), because the DSV looks very messy and is hard to follow the lines.
Any suggestions appreciated!
I suppose there is no hope of contacting the person who created the cube, or currently maintains it? If you are not familiar with the data warehouse the cube comes from, I can see why this would feel like a nightmare. There may be various procs/jobs which load data in.
One on-going problem in my last job was a customer upset that the cube totals did not match with the figures from other places in our web application. Each week there would be a debate between the OLAP team and the web team, to decide which value ws "right" and how we could explain the difference!