I am looking to create a calculated member in SSAS 2012 that aggregates a "Confirmed" measure over a "Confirmed Month" hierarchy from the "Confirmed Date" dimension. I have attached a screenshot from a tool called "Pyramid Analytics" that shows what I have so far. I have also attached a screenshot of how the "Confirmed Date" dimension is laid out in BIDS. So, for each month in the future, the calculated member should aggregate the data to include the "confirmed" count for that month plus the "confirmed" count from all the previous months.
I am not very comfortable with writing MDX and I would be very grateful if someone could get me started. Thanks.
Related
I have created an insight with a date filter, and enabled "Compare the period with", selecting either "Same period previous year" or "Previous period" for all measures (I only have one). In the insight designer, things are labeled as expected: One color with my measure name, and another with measure name - SP year ago.
However, when I get the visualization object for my insight, the SP year ago measure does not have a "title". I can manually compute the title, but is there a way to get it through the API?
Title for PoP/Previous period is not stored in visualization object but instead generated in Analytical Designer from original measure's title, so we can correctly localize it. So to answer your question, there is currently no way to get it from API.
Peter
I hope someone has a clue how to solve this issue.
I have two fact tables one with revenue per company, year, catalogue_no and revenue and the other with company, year and customer_base.
I want to combine these measures in an analysis but the catalogue_no is not part of the customer_base table.
What I've achieved so far, by setting the right levels in BMM, is that I can put the catalogue_no in the filter criterias and get the result that all figures are shown correctly.
As soon as I place the dimension catalogue_no into the selected columns the customer_base is only blank.
See the picture for Explanation. Link
You have to put the content level for the non-conformed dimension to the "Grand Total" level
I am having some issues trying to implement an average of a dimension attribute.
The basic structure is:
Booking Header Dimension
Fact Table (multiple rows per Booking Header
entry)
On the booking header dimension I have a numerical attribute called Booking Window, and I want to be able to create a calculated measure that averages this value.
We are using SQL Server 2012 standard edition.
Any help would be greatly appreciated.
The best approach would be to create a measure group from the dimension table (in BIDS, go to cube designer, tab "Cube Structure", right-click the cube object in the Measures list, and select "New Measure Group", select your dimension table). BIDS will generate some measures, and you can remove all but two: the one based on your numeric attribute (I will call it "YourSummedAttrib" to have a name to refer to below), and the count measure. The aggregate function for the measure "YourSummedAttrib" will probably be "sum", leave that as it is.
Then, create a calculated measure which divides "YourSummedAttrib" by the count measure, which gives the average. Finally, if you have tested everything, make the two measures "YourSummedAttrib" and the count measure invisible before you give the cube to the users, as they only need to see the average, which is the calculated measure.
You can try this which should give you the average of that attribute across all members.
WITH MEMBER [Measures].[Booking Window Value] AS
[Booking Header].[Booking Window].CURRENTMEMBER.MEMBER_VALUE
MEMBER [Measures].[Avg Booking Window Value] AS
AVG([Booking Header].[Booking Window].[Booking Window].MEMBERS,[Measures].[Booking Window Value])
SELECT
[Measures].[Avg Booking Window Value] ON COLUMNS
FROM
[YourCube]
Hope that helps and apologies for any confusion on my part.
Ash
I tried to use the same idea, but without success. The solution I found was create a view with the calculated average and include a new group of measures.
I am building a Mondrian Cube that shows information for a large range of dates. One of the measures for this cube is an average of a percentage value. Because some of the items in the cube should not make up the final average, I need to know how to filter them out based off this measure and only for this calculated member.
Found the solution to this thanks to the group over at the Pentaho forum:
http://forums.pentaho.org/showthread.php?t=75742
First some background: I have the typical Date dimension (similar to the one in the Adventure Works cube) and an Account dimension. In my fact table I have daily transaction amounts for the accounts.
I need to calculate cumulative transaction amounts for different accounts for different periods of time. The catch is that whatever is the first period shown on the resulting report should get its transaction amount as-is from the fact table and all the following periods in the report should have cumulative amounts.
For example, I might have a single account on rows and on columns I could have [Date].[Calendar].[Calendar Year].[&2005]:[Date].[Calendar].[Calendar Year].[&2010]. The transaction amount for 2005 should have the sum of transaction amounts that took place in 2005 for that specific account. For the following year, 2006, the transaction amount should be TransactionAmountsIn2005 + TransactionAmountsIn2006. Same goes for the remaining of the years.
My problem is that I don't really know how to specify this kind of calculated member in the cube because the end-user who is responsible for writing the actual MDX queries that produce the reports could use any range of periods on any hierarchy level of the Date dimension.
Hope this made some sense.
Teeri,
I would avoid letting the end-user actually write MDX queries and just force them to use ranges you defined. To clarify, just give them a start and end date, or a range if you will, to select and then go from there. I've worked with accounting and finance developing cubes (General Ledger, etc) for years and this is usually what they were ultimately looking for.
Good luck!